Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Dave. That sounds like a good idea. Otto
"Dave Peterson" wrote in message ... You could loop through all the buttons/objects on the sheet and look at the .onaction string. Then change the oldname.xls to the newname.xls (thisworkbook.name???). But if you're only using buttons from the Forms toolbar, you may find it much easier to replace them with the Commandbuttons from the control toolbox toolbar. Those objects don't have macros assigned to them. They have events and those event procedures live under the worksheets that own the commandbuttons. Otto Moehrbach wrote: Excel XP & Win XP Everything below is done via VBA. I have a workbook, say A.xls, that has a number of macros and a number of buttons here and there to trigger the macros. All the macros assigned to the buttons are in that workbook. I do some work with this workbook. Then I SaveAs as B.xls. In the B.xls workbook, the macro assignments all reference A.xls as the location of the macros. I want the macro assignments in B.xls to reference B.xls. Is there some code that I can employ at the time of the SaveAs to carry the macro assignments to the new workbook? If not, what would be the best way to change the macro assignments to B.xls after B.xls is created? Thanks for your time. Otto -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use Macro To Change Which Macro Assigned To Command Button | Excel Discussion (Misc queries) | |||
Can't change macro assigned to drawing object | Excel Programming | |||
If line ends in assigned value then change item in COMMENT. | Excel Programming | |||
Assigned macros change location | Excel Discussion (Misc queries) | |||
Change the assigned chart number | Excel Programming |