General information
Category:
COM/DCOM and OLE Automation
Title:
Saving a spreadsheet using Automation
My application will be called when Excel is up and a spreadsheet is visible. I need to save the spreadsheet as a text file. In testing my code I put the following in the command window (with the aid of Intellisense):
myExcelApp = GetObject(, "Excel.Application")
myExcelApp.ActiveWorkbook.SaveAs ("c:\SamSludge.txt")
I get an error message from teh 2nd command saying that ActiveWorkbook does not evaluate to a object. Yet TYPE ("myExcelApp.ActiveWorkbook") returns "O". What did I do wrong?
Tim
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only