bitpusher
04-11-2005, 07:14 PM
I've written a VB6 app that does some EXCEL OLE automation. And for the most part, I've been able to suppress any error messagest that pop up. However, I'm now getting the following error:
?Could not load an object because it is not available on this machine?
On this line of code:
Call XLApp1.ActiveWorkbook.SaveAs(sTarget, lTargetType, , , , , , _
xlLocalSessionChanges)
When I Create the XLApp1 object, I do the following to suppress the error conditions:
Set XLApp1 = New Excel.Application
XLApp1.Application.DisplayAlerts = mbVerbose
' Required!!!!! to disable macros and other things
XLApp1.EnableEvents = False
XLApp1.Visible = False
XLApp1.Application.DisplayAlerts = mbVerbose
XLApp1.AskToUpdateLinks = mbVerbose
XLApp1.AlertBeforeOverwriting = mbVerbose
XLApp1.PromptForSummaryInfo = mbVerbose
where mbVerbose = False Once you get through the message boxes that pop up, it actually does save ok. I cannot have any messge boxes pop up, period, as this will run unattented on a server. My app can be working with MS Excel 97-2003. Any and all suggestions are greatly appreciated.
?Could not load an object because it is not available on this machine?
On this line of code:
Call XLApp1.ActiveWorkbook.SaveAs(sTarget, lTargetType, , , , , , _
xlLocalSessionChanges)
When I Create the XLApp1 object, I do the following to suppress the error conditions:
Set XLApp1 = New Excel.Application
XLApp1.Application.DisplayAlerts = mbVerbose
' Required!!!!! to disable macros and other things
XLApp1.EnableEvents = False
XLApp1.Visible = False
XLApp1.Application.DisplayAlerts = mbVerbose
XLApp1.AskToUpdateLinks = mbVerbose
XLApp1.AlertBeforeOverwriting = mbVerbose
XLApp1.PromptForSummaryInfo = mbVerbose
where mbVerbose = False Once you get through the message boxes that pop up, it actually does save ok. I cannot have any messge boxes pop up, period, as this will run unattented on a server. My app can be working with MS Excel 97-2003. Any and all suggestions are greatly appreciated.