D
dim
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.
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.