Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to determine if a Excel file is opening

Status
Not open for further replies.

viettla

Programmer
Jul 19, 2002
34
VN
Hi all,
I want to determine if a Excel file is opening and Can I close that file ?
thank you

Viet
 
viettla

It depends how you opened it.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Are you using OLE Automation to open the file? When you open the file (presumably using oExcel.Workbookbooks.Open()), you should save the object reference returned to a variable. If that variable is type "O", then the file was opened.

Actually, if you couldn't open it with that command, you would have gotten an error message.



-BP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top