ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Bottons Fail After Moving File (https://www.excelbanter.com/excel-programming/348843-bottons-fail-after-moving-file.html)

Dave Brodak[_2_]

Bottons Fail After Moving File
 
Ive created a custom toolbar with buttons, created and assigned macros to
the buttons. Clicking the buttons runs the macros as expected.

But I have a problem if I save the file (in FOLDER1 for my example), move
the file to another folder (FOLDER2) on the local hard drive using Windows
Explorer, and then open the file located in the new folder (FOLDER2). When I
click the buttons, a dialog box pops up saying that the macro can not be
found, with an error that references the original folder location (FOLDER1)
where the file/toolbar/macro was originally created and saved.

Ive tried the following solutions, all of which have failed:
1. Saving the macros in the Personal Macro Workbook before saving and moving;
2. Attaching the toolbar to the file before saving and moving;
3. Consulted all of the HELP for macros and toolbars, but nothing is
mentioned about the limitations of toolbar macros working when moving a file
to another folder.

If I do a SAVE AS, save the file in different folder (FOLDER3), close Excel
completely, restart Excel, open the new file now located in the new folder
(FOLDER3), clicking the buttons works. But if I then close the new file,
open the original file in the original folder (FOLDER1) and click the
buttons, the error now reads that the macro can not be found and references
FOLDER3.

It seems as if the toolbar button macros will only work when the file is
opened in the folder where it was last saved, not moved to.

I really need to be able to move the file around to different folders using
Windows Explorer and have the buttons work properly. What am I missing?
Thanks in advance.

--
Dave Brodak

Tom Ogilvy

Bottons Fail After Moving File
 
See answer to your first posting. Plus

http://msdn.microsoft.com/library/en...ce04042002.asp

--
Regards,
Tom Ogilvy


"Dave Brodak" wrote in message
...
I've created a custom toolbar with buttons, created and assigned macros to
the buttons. Clicking the buttons runs the macros as expected.

But I have a problem if I save the file (in FOLDER1 for my example), move
the file to another folder (FOLDER2) on the local hard drive using Windows
Explorer, and then open the file located in the new folder (FOLDER2).

When I
click the buttons, a dialog box pops up saying that the macro can not be
found, with an error that references the original folder location

(FOLDER1)
where the file/toolbar/macro was originally created and saved.

I've tried the following solutions, all of which have failed:
1. Saving the macros in the Personal Macro Workbook before saving and

moving;
2. Attaching the toolbar to the file before saving and moving;
3. Consulted all of the HELP for macros and toolbars, but nothing is
mentioned about the limitations of toolbar macros working when moving a

file
to another folder.

If I do a SAVE AS, save the file in different folder (FOLDER3), close

Excel
completely, restart Excel, open the new file now located in the new folder
(FOLDER3), clicking the buttons works. But if I then close the new file,
open the original file in the original folder (FOLDER1) and click the
buttons, the error now reads that the macro can not be found and

references
FOLDER3.

It seems as if the toolbar button macros will only work when the file is
opened in the folder where it was last saved, not moved to.

I really need to be able to move the file around to different folders

using
Windows Explorer and have the buttons work properly. What am I missing?
Thanks in advance.

--
Dave Brodak





All times are GMT +1. The time now is 03:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com