nd4spdrace
Member
- Joined
- Feb 11, 2003
- Messages
- 7
I am trying to rename a file and save it but it keeps throwing errors at me. I also want to turn off the alerts for overwriting an old file but again it will not let me do it. Is there an extra reference or something i am forgetting? here is part of my code. I know the links to the Worksheets are working because it will write to them. I am just want to save a different sheet for each user. Also all of my functions and methods work so I know that is not the problem.
CreateTimeSheet()
CreateReport()
Wb.DisplayAlerts = False Doesnt Work
Wb.SaveAs("I:\Foundation\2003 Files\2003 Employee Timesheets\ " & Listbox1.SelectedItem() & SelectedDate() & ".xls") Doesnt Work
Xl.Visible = True
Wb.DisplayAlerts = True Doesnt Work
Wb2.Close(False)
Wb2.DisplayAlerts = False
Wb2.SaveAs("I:\Foundation\2003 Files\2003 Employee Timesheets\Report.xls")
Wb2.DisplayAlerts = True
X2.Application.Quit()
X2 = Nothing
Wb2 = Nothing
Ws2 = Nothing
Me.Close()
CreateTimeSheet()
CreateReport()
Wb.DisplayAlerts = False Doesnt Work
Wb.SaveAs("I:\Foundation\2003 Files\2003 Employee Timesheets\ " & Listbox1.SelectedItem() & SelectedDate() & ".xls") Doesnt Work
Xl.Visible = True
Wb.DisplayAlerts = True Doesnt Work
Wb2.Close(False)
Wb2.DisplayAlerts = False
Wb2.SaveAs("I:\Foundation\2003 Files\2003 Employee Timesheets\Report.xls")
Wb2.DisplayAlerts = True
X2.Application.Quit()
X2 = Nothing
Wb2 = Nothing
Ws2 = Nothing
Me.Close()