Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to validate path? --- bValidatePath ("") Then
Hi all,
I have two workbooks called Book1 and Book2. Book1 simply displays a userform when opened, and when the user clicks 'Ok' it closes Book1 and opens Book2. I am going to create a 3rd workbook called Book3. Book3 will be an exact copy of Book2, but in Book2 all VBA code path's read C:\.... and in Book3 I will have them reading D:\... This will be to allow a user to run the program from a hard-drive designated as C or D. The files are all located in a folder called My Program, and the user's install instructions are to copy the folder into their Program Files path. So the total path on the users computer will end up being either: C:\Program Files\My Program\Book2.xls or D:\Program Files\My Program\Book3.xls When Book1 is open, I want to include in the Button1 Click macro some form of validation so it can tell if it is located in C:\Program Files\... or D:\Program Files\.... This will be followed by an IF THEN ELSE, so that if its in C:\... Then it will open Book2, and if its in D:\... it will open Book3....makes sense?...any ideas how to get this to work? I think the code involves 'ValidatePath' something something? Thankyou. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
Validate Data in VBA "How to get lost focus cell address" | Excel Programming |