Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
workbook and application reference set to null after the user enters something in an excel sheet
Hello All,
I've got the following problem: I'm trying to control an Excel Application using ActiveX (out of Agilent-Vee). I create the application, open an Excel file and make it visible. The user is supposed to enter data in the sheet and after that has to push a button (its a vee button) and the workbook is saved (out of vee). It works perfect as long as the user doesn't enter any data. As soon as he does the references to my workbook and application are set to Null and I'm not able to save it anymore. I get the message "SaveAs" is not a member of the referenced ActiveX object (which will bee the reference to the workbook). The code (entered in Vee Formulars, but i think i doesn't matter): set ExcelApp=Createbject("Excel.Application"); ExcelApp.Visible=True; ExcelApp.Workbooks.Open(filename); set ExcelBook=ExcelApp.ActiveWorkbook; then I call the "save" button if the button is pressed: ExcelApp.SaveAs(filename); ExcelBook.Close(); ExcelApp.Quit(); ExcelApp and ExcelBook are global variables. I hope somebody can help me here - thank you very much. Tobias |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to create a form on one sheet that enters data into another | Excel Discussion (Misc queries) | |||
reference different sheet in same workbook | Excel Worksheet Functions | |||
trying to get day/month/year froamt while user enters year only | New Users to Excel | |||
User enters data in popup box - its entered into desired cell | Excel Programming | |||
How do I protect my hidden Excel.Application object from unwanted user interaction. | Excel Programming |