CIao a tutti..ho questo problema:
dopo aver scritto su un file excel tramite codice, tramite un tasto salva nel mio form dovrei riuscire a salvare il file excel gia esistente con le modifiche appena apportate.
Pero appena clicco sul tasto Salva mi esce una dialog form che mi chiede dove salvare il file excel appena modificato. Non deve fare questo, deve salvare automaticamente sul file gia esistente..
Vi posto il mio pezzetto di codice..aspetto vostro aiuto grazie mille!
Dim xlApp As Microsoft.Office.Interop.Excel.Application ' Riferimento all'applicazione Excel
Dim xlBook As Microsoft.Office.Interop.Excel.Workbook ' Riferimento al Workbook
Dim xlSheet As Microsoft.Office.Interop.Excel.Worksheet ' Riferimento al Worksheet
xlApp = New Microsoft.Office.Interop.Excel.ApplicationClass
xlBook = xlApp.Workbooks.Open(Me.ExcelFilePath)
xlSheet = xlBook.Worksheets("PREVENTIVO")
xlSheet.Activate()
xlSheet.Cells(4, 44) = Ragio
xlSheet.Cells(5, 44) = Ind
xlSheet.Cells(6, 44) = Cap
xlSheet.Cells(6, 51) = Loc
xlSheet.Cells(6, 81) = Prov
xlBook.Close(True)
xlApp.Quit()
xlSheet = Nothing
xlBook = Nothing
xlApp = Nothing
Sono andati tutti in vacanza giusto?