Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to keep macros attached when moving sheet to a new workbook
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to keep macros attached when moving sheet to a new workbook
Another option may be to remove the buttons and code completely and add a
toolbar that has icons which run macros against the activesheet. It may be less work if you ever have to update one of those macros--since they would only be in one location. 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Moving Sheet to Closed Workbook | Excel Discussion (Misc queries) | |||
I get a macro warning when there are no macros attached | Excel Programming | |||
Can I prevent a sheet from moving within a workbook? | Excel Programming | |||
Can I prevent a sheet from moving within a workbook? | Excel Programming | |||
Moving Macros with Sheets to New Workbook | Excel Programming |