Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Public Const on a Drive
Good day all,
I have a series of excel files (all inter-linked) located in a folder called "MasterFolder". Winthin that MasterFolder, I have other secondary folders (Folder1, Folder2...). Since all the files within these folders are all linked by macros, I use Public Const to identify my directories instead of having to retype the full path. (ie c:\MasterFolder\Folder1\... I would have a : Public Const MainDrive = "C:\" Public Const PCFolder = "MasterFolder\Folder1\" etc.). So I could do things like open file MainDrive + PCFolder + "file.xls" (c:\MasterFolder\Folder1\file.xls) The thing is if I install this program on a drive other than the C: drive, I have to go and modify my Public Const formula to fit the drive it is running on. So, Is there a way to formulate my path in a way that I won't declare the drive but instead it will detect what drive the MfasterFolder is in and use that drive as it's "drive" by default when my MainDrive constant is declared. Regards, Michel |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional format to highlight only cells with formula, not const | Excel Worksheet Functions | |||
Links to mapped drive change to refer to local hard drive | Links and Linking in Excel | |||
crash changing const to public const | Excel Programming | |||
Pasting a range of information from a foler on F Drive to another folder on same drive | Excel Programming | |||
XLL - VS .Net2003 - init problem - const char strings - /Gf option?? | Excel Programming |