S
Sierra
Guest
Im puzzeling with vb and excel, and have 2 questions
1 st How can I save the xls file without being prompted that im overwriting an existing file..
2nd If i open the saved xls file i have to make the tab visible
Heres a peice of code I used.
Public objWorkbook As Excel.Workbook
Public objworksheet As Excel.Worksheet
Public datum = Date.Today
Private Sub exit_button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exit_button.Click
Save het exel werkblad als datum.xls
objWorkbook.SaveAs("C:\Program Files\EMTS Laboratory\Enquete\" & datum & ".xls")
Maakt he geheugen leeg
objWorkbook.Close()
objWorkbook = Nothing
objworksheet = Nothing
GC.Collect()
Appexel.Quit()
Beeindig het programma
End
End Sub
thanks in advance
Sietze
1 st How can I save the xls file without being prompted that im overwriting an existing file..
2nd If i open the saved xls file i have to make the tab visible
Heres a peice of code I used.
Public objWorkbook As Excel.Workbook
Public objworksheet As Excel.Worksheet
Public datum = Date.Today
Private Sub exit_button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exit_button.Click
Save het exel werkblad als datum.xls
objWorkbook.SaveAs("C:\Program Files\EMTS Laboratory\Enquete\" & datum & ".xls")
Maakt he geheugen leeg
objWorkbook.Close()
objWorkbook = Nothing
objworksheet = Nothing
GC.Collect()
Appexel.Quit()
Beeindig het programma
End
End Sub
thanks in advance
Sietze