LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Changing path of button macro assignment

Excel XP & WinXP
I am helping an OP with a rather large project he has with a client. The
file, say TheFile.xls, has many sheets and most of the sheets have at least
one button with many sheets having multiple buttons. Obviously, the macros
assigned to the buttons are varied. All the macros are contained in another
file, "XX Personal.xls".
The problem comes about when he copies his file (TheFile.xls) from his
computer and takes it and installs it into his client's computer. The
problem is that Excel maintains the path to the assigned macro (for each
button) as that path that was valid in the OP's computer. Obviously, that
path has to be changed. Please note that the file name in the path remains
constant (XX Personal.xls). The macro name changes for each button.
One way that I see to make the necessary path change is to write & run a
macro that loops through all the buttons on each sheet, looks at the path
assignment for each button, searches for the constant file name (XX
Personal.xls), notes the macro name that follows in the path, and changes
the total path to that file name (XX Personal.xls) and macro name.
My question is: Is there a better way to do this? Thanks for your help.
Otto


 
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
changing the path behind a button derksj Excel Discussion (Misc queries) 1 September 11th 08 01:58 PM
code to reassign a macro to a toolbar button because of path change Almagg via OfficeKB.com Excel Discussion (Misc queries) 0 April 27th 07 06:42 PM
Macro for changing path in macro Nigel Excel Programming 2 August 16th 05 03:02 PM
VBA to change Button Macro assignment Ken Loomis Excel Programming 2 August 6th 05 05:47 PM
Macro assignment to button gets reassigned John Gittins Excel Programming 1 August 5th 03 10:18 PM


All times are GMT +1. The time now is 06:05 AM.

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"