Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing macro source
I wrote a proceedure in Excel 97 with links to 25 seperate
files of code and user forms, all stored in one folder. When the proceedure file is moved to a different folder or drive, or saved in a different folder or drive, Excel will change the macro link source to look in the folder or drive in which it was moved. I know I can change the link source, but there are approximately 25 people using this proceedure, storing it in their own filing system, which created error when opening "cannot find file". Is there any way to disable the automatic changing of the link source so it will always look in the same folder and drive for the macros? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing macro source
Steve,
when you specify the files, did you include a path, or assume that the filenames would always be in the current folder? When designing for a network, I generally use a global constant to specify the pathname of the target files. Place this in the module declarations and it is a single point at which you can change the path for the relevant files try adding 'global constant filepath ="\\server\folder\subfolder\ "' to the declaration area and then referencing the files as workbooks(filepath &"filename.xls") Steve "Steve Boyer" wrote in message ... I wrote a proceedure in Excel 97 with links to 25 seperate files of code and user forms, all stored in one folder. When the proceedure file is moved to a different folder or drive, or saved in a different folder or drive, Excel will change the macro link source to look in the folder or drive in which it was moved. I know I can change the link source, but there are approximately 25 people using this proceedure, storing it in their own filing system, which created error when opening "cannot find file". Is there any way to disable the automatic changing of the link source so it will always look in the same folder and drive for the macros? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Source is Changing | Excel Discussion (Misc queries) | |||
SUM of Changing source value, pls help!!! | Excel Discussion (Misc queries) | |||
Changing Data Source | Excel Worksheet Functions | |||
Changing the source of a link | Excel Discussion (Misc queries) | |||
Changing the source of links. | Excel Discussion (Misc queries) |