Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check an object reference
Using Office 2003 and Windows XP;
I have an object reference to a file, call it "goFile". I need to be able to do two things with this reference: 1. Determine if the file it is refering to is open. 2. Determine if the reference is set to anything. Could someone please post example code that illustrates these two things? Thanks much in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check an object reference
if gofile is not nothing then
For Each wbk In Workbooks if wbk.name = gofile then ' Enter code here end if next wbk end if "XP" wrote: Using Office 2003 and Windows XP; I have an object reference to a file, call it "goFile". I need to be able to do two things with this reference: 1. Determine if the file it is refering to is open. 2. Determine if the reference is set to anything. Could someone please post example code that illustrates these two things? Thanks much in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check an object reference
Hello,
Sorry to butt in but I think the actual syntax should be: If Not gofile Is Nothing HTH, JP On Oct 19, 5:50 pm, Joel wrote: if gofile is not nothing then For Each wbk In Workbooks if wbk.name = gofile then ' Enter code here end if next wbk end if "XP" wrote: Using Office 2003 and Windows XP; I have an object reference to a file, call it "goFile". I need to be able to do two things with this reference: 1. Determine if the file it is refering to is open. 2. Determine if the reference is set to anything. Could someone please post example code that illustrates these two things? Thanks much in advance.- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
check if name object exists | Excel Programming | |||
How to, check if a picture object exist | Excel Programming | |||
How to check if an object has a certain property? | Excel Programming | |||
Check for any data changes in a form with multipage object | Excel Programming |