Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Source is Changing dhstein Excel Discussion (Misc queries) 4 May 9th 09 04:46 PM
SUM of Changing source value, pls help!!! americasrecycler Excel Discussion (Misc queries) 8 February 2nd 09 11:16 PM
Changing Data Source nathan_savidge Excel Worksheet Functions 1 July 17th 08 05:53 PM
Changing the source of a link zhj23 Excel Discussion (Misc queries) 3 June 24th 07 02:34 PM
Changing the source of links. rj Excel Discussion (Misc queries) 0 April 26th 06 03:59 PM


All times are GMT +1. The time now is 03:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"