I am running this module as a stand alone .exe to auto refresh an excel file. The problem is how do I avoid the save prompt from appearing to make it fully automatic?
Public Sub ExcelRefresh()
Set objExcel = New Excel.Application
objExcel.Visible = False
objExcel.DisplayAlerts = False
Set objworkbook = objExcel.Workbooks.Open("S:\Charge Off Forcasting\Gain-Loss Dump File\Weekly Gain Loss Report.xls")
objExcel.Cells(4, 1).Select
objExcel.Selection.QueryTable.Refresh BackgroundQuery:=False
objworkbook.Save
objworkbook.Close
objExcel.Quit
Set objworkbook = Nothing
Set objExcel = Nothing
End Sub
Any help is appreciated
Public Sub ExcelRefresh()
Set objExcel = New Excel.Application
objExcel.Visible = False
objExcel.DisplayAlerts = False
Set objworkbook = objExcel.Workbooks.Open("S:\Charge Off Forcasting\Gain-Loss Dump File\Weekly Gain Loss Report.xls")
objExcel.Cells(4, 1).Select
objExcel.Selection.QueryTable.Refresh BackgroundQuery:=False
objworkbook.Save
objworkbook.Close
objExcel.Quit
Set objworkbook = Nothing
Set objExcel = Nothing
End Sub
Any help is appreciated