Home |
Search |
Today's Posts |
#13
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Long IF Statement | Excel Discussion (Misc queries) | |||
If statement | Excel Discussion (Misc queries) | |||
Do I need a sumif or sum of a vlookup formula? | Excel Worksheet Functions | |||
IF Statement nightmare | Excel Discussion (Misc queries) | |||
How do I fix a circular reference in a financial statement? | Excel Discussion (Misc queries) |