Ciao a tutti , sto sviluppando un'applicazione in VB6 che registra dei dati ogni minuto in un file excel.
Mi succede che , se il file è già aperto , i dati non vengono registrati (mi crea delle righe vuote) ma il codice non mi da nessun errore.
Qui di seguito il codice che utilizzo per scrivere i dati nel file excel.
Set oExcel = CreateObject("Excel.Application")
Set oBook = oExcel.Workbooks.Open(Path_file & snomefile)
'Add data to cells of the first worksheet in the new workbook
Set oSheet = oBook.Worksheets(1)
oSheet.Range("A" & Contatore).Value = Now
'Save the Workbook and Quit Excel
oBook.Application.DisplayAlerts = False
oBook.save
oExcel.Quit
Qualcuno sa suggerirmi se posso scrivere i dati anche se il file è aperto ?
Grazie mille