I have a number of programs that produce an Excel spreadsheet. I use something like what is included below to create the spreadsheets. After execution, the spreadsheet is displayed and all of my macros in Excel are not there. In the addins screen, the macros all show with a check in the box. If I open up VB to edit the macros, it shows nothing but the current worksheet, no macros. If I uncheck the macro in the addin screen, then check it, it will load the macro. Does anyone know what is causing Excel to load without the macros or how I can cause Excel to actually load the macros?
CREATE "Excel.Application" chExcelApplication.
chExcelApplication:Visible = FALSE.
chWorkbook = chExcelApplication:Workbooks:Add().
chWorksheet = chExcelApplication:Sheets:Item(1).
chWorksheet:Range("A1"):Value = "Report ID:".
chWorksheet:Range("E1"):Value = "Customer".
...
chWorksheet:Range("A:AH"):EntireColumn:AutoFit.
chExcelApplication:Visible = true.
chWorkbook:SaveAs("C:\Symwork\cs00058",,,,,,,,TRUE) no-error.
RELEASE OBJECT chExcelApplication.
RELEASE OBJECT chworkbook.
RELEASE OBJECT chWorksheet
Any recommendations would be greatly appreciated.
Does this happen to anyone else?
Thanks.
CREATE "Excel.Application" chExcelApplication.
chExcelApplication:Visible = FALSE.
chWorkbook = chExcelApplication:Workbooks:Add().
chWorksheet = chExcelApplication:Sheets:Item(1).
chWorksheet:Range("A1"):Value = "Report ID:".
chWorksheet:Range("E1"):Value = "Customer".
...
chWorksheet:Range("A:AH"):EntireColumn:AutoFit.
chExcelApplication:Visible = true.
chWorkbook:SaveAs("C:\Symwork\cs00058",,,,,,,,TRUE) no-error.
RELEASE OBJECT chExcelApplication.
RELEASE OBJECT chworkbook.
RELEASE OBJECT chWorksheet
Any recommendations would be greatly appreciated.
Does this happen to anyone else?
Thanks.