LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #13   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default SET statement tutorial

if x = 1 then
set wrkbkurl1 = workbooks.open(filename:="P:\VBA training....\....xls")
elseif xl = 2
set wkrkburl2 = workbooks.open(filename:="yourother path here")
end if

Daminc wrote:

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


--

Dave Peterson
 
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
Long IF Statement rmitchell87 Excel Discussion (Misc queries) 2 October 2nd 05 03:50 AM
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
IF Statement nightmare eugenevr Excel Discussion (Misc queries) 6 May 18th 05 01:09 PM
How do I fix a circular reference in a financial statement? drjayhawk25 Excel Discussion (Misc queries) 0 February 7th 05 05:19 PM


All times are GMT +1. The time now is 12:00 PM.

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

About Us

"It's about Microsoft Excel"