Use Macro To Change Which Macro Assigned To Command Button

C

CVinje

I'm trying to create a macro that will change the macro associated with
multiple Command Buttons on my spreadsheet. I've been able to use the macro
recorder to change the macros associated with "regular" buttons on the sheet;
however, the recorder does not track the changing of the macro associated
with Command Buttons. A quick example of what I need to accomplish:

CommandButton23 is currently assigned to the macro "TOTYr_Day1" via:
Private Sub CommandButton23_Click()
TOTYr_Day1
End Sub

I need to change that to be assigned to the macro TOTYr_Day1_NEW:
Private Sub CommandButton23_Click()
TOTYr_Day1_NEW
End Sub

I'm stumped and would appreciate any help you can provide.

Thanks,

CVinje
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top