View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.misc
Daminc
 
Posts: n/a
Default SET statement tutorial


With regards to:
Set wrkbkUrl1 = Workbooks.open _
(filename:="P:\VBA training\Excel templates for Network stats\1
Network.xls")

can I attach a name (i.e. wrkbkUrl1) to a workbook without opening it?

I want to use it later on for example:

If x=1 then wrkbkUrl1.open
elseif
x=2 then wrkbkUrl2.open
end if

or something like that?

I though it might be :

Set wrkbkUrl1 = Workbooks(filename:="P:\VBA training\Excel templates
for Network stats\1 Network.xls")

but it doesn't work :(


--
Daminc
------------------------------------------------------------------------
Daminc's Profile: http://www.excelforum.com/member.php...o&userid=27074
View this thread: http://www.excelforum.com/showthread...hreadid=501108