Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a form on one sheet that enters data into another SSW Excel Discussion (Misc queries) 4 May 29th 08 12:58 PM
reference different sheet in same workbook Eric Excel Worksheet Functions 5 July 23rd 06 07:38 AM
trying to get day/month/year froamt while user enters year only RADIOOZ New Users to Excel 3 June 7th 06 05:30 AM
User enters data in popup box - its entered into desired cell ian123[_30_] Excel Programming 1 December 28th 03 03:16 PM
How do I protect my hidden Excel.Application object from unwanted user interaction. wijwoj Excel Programming 0 October 30th 03 04:49 PM


All times are GMT +1. The time now is 04:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"