Thread
:
How to keep macros attached when moving sheet to a new workbook
View Single Post
#
2
Posted to microsoft.public.excel.programming
Dave Peterson
external usenet poster
Posts: 35,218
How to keep macros attached when moving sheet to a new workbook
You'll have to reassign the buttons to the macros in the new workbook. So those
macros have to be copied over, too.
If you're moving the sheets, you may be able to just dump those controls from
the Forms (?) toolbar and use the commandbuttons from the Control toolbox
toolbar.
The code for these controls lives under the worksheet--so it gets copied when
the sheet gets copied.
wrote:
I need to move sheets back and forth between different workbooks, and I
have no idea how to keep the macros attached to the graphical buttons
on the sheet itself. When I use the buttons (they have macros attached
to add new row), it searches for the old file it came from, even if the
correct macros are attached to the sheet, and I have to re-link the
buttons. Any ideas how to make the path automatically re-assign itself
to the macros in the new workbook?
--
Dave Peterson
Reply With Quote
Dave Peterson
View Public Profile
Find all posts by Dave Peterson