Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Constructing a path to open file
Thanks to previous replies I now have the global variable I need to construct
the network path to a user store file. The variable CommandN has the no. of 1-7 which dictates a users management area. I need to use this to construct the network path to use in a workbooks.open command. e.g workbooks.open("Z:/Systemdown/"&CommandN&"/Userfile.xls") The module won't compile like this. Can someone show how to write this line correctly. Regards and Thanks for any assistance. Francis Brown. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Constructing a path to open file
Remove the opening and closing parentheses, and put spaces around
your '&' characters. Without the spaces, VBA treats the & character as a data type specifier, not a concatenation operator. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Francis Brown" wrote in message ... Thanks to previous replies I now have the global variable I need to construct the network path to a user store file. The variable CommandN has the no. of 1-7 which dictates a users management area. I need to use this to construct the network path to use in a workbooks.open command. e.g workbooks.open("Z:/Systemdown/"&CommandN&"/Userfile.xls") The module won't compile like this. Can someone show how to write this line correctly. Regards and Thanks for any assistance. Francis Brown. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open Dialog Box to return Selected File Path and Not Open it. | Excel Programming | |||
Default Path for File Open | Excel Programming | |||
Open File with Spaces in Path | Excel Programming | |||
File open with Path Name | Excel Programming | |||
How set file open path to filepath of file opened with Explorer ? | Excel Programming |