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 <J...@discussions.microsoft.com> 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 -
|