for some reason i recieve msgbox asking if i'd like to save the following file when i run this code listed below.
would my setwarning stop this? what cahgnes are needed to have them save without the msgboses to pop up?
would my setwarning stop this? what cahgnes are needed to have them save without the msgboses to pop up?
Code:
Private Sub SaveExportGenericOB()
Const FILE_PATH As String = "G:\Path\"
Dim strFullPath As String
strFullPath = FILE_PATH
DoCmd.SetWarnings False
Call DeleteXLSReport
Set objXl = CreateObject("Excel.Application")
With objXl.Application
.Visible = False
'This is the file to run the code on
.Workbooks.Open "G:\ PricingExportCURRENT.xls"
'This is the file that contains the macros
.Workbooks.Open "G: \CalcSummaryCreator.xls"
'Set the file to run the macro on as active
.Workbooks("PricingExportCURRENT.xls").Activate
'Call the macro
.Run "CalcSummaryCreator.xls!combo"
'Save the newly altered file
'.ActiveWorkbook.SaveAs (strFullPath & "PhaseTWOFlatBandPricingExport")
.ActiveWorkbook.SaveAs (strFullPath & "PhaseTWOFB")
.Quit
End With
Call DeleteXLSCURRENT
DoCmd.SetWarnings True
Set objXl = Nothing
End Sub