A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Use Macro To Change Which Macro Assigned To Command Button



 
 
Thread Tools Display Modes
  #1  
Old May 25th, 2010, 09:55 PM posted to microsoft.public.excel.misc
CVinje
external usenet poster
 
Posts: 29
Default Use Macro To Change Which Macro Assigned To Command Button

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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.