Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default VBA to change Button Macro assignment

I would like to change or remove a macro assignment to buttons.

I use this to change the text of a shape that I use as a button:

ActiveSheet.Shapes("Rectangle 5").Select
Selection.Characters.Text = "Mark Anomolies"

How would I change or remove the macro assignment to that button?

TIA,
Ken


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default VBA to change Button Macro assignment

Hi Ken,

To change assignment, try:

ActiveSheet.Shapes("Rectangle 5")..OnAction = "MyNewMacro"


To Remove the assignment:

ActiveSheet.Shapes("Rectangle 5")..OnAction = ""


---
Regards,
Norman



"Ken Loomis" wrote in message
...
I would like to change or remove a macro assignment to buttons.

I use this to change the text of a shape that I use as a button:

ActiveSheet.Shapes("Rectangle 5").Select
Selection.Characters.Text = "Mark Anomolies"

How would I change or remove the macro assignment to that button?

TIA,
Ken




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default VBA to change Button Macro assignment

Hi Ken,

Try something like this.

To remove only:
ActiveSheet.Shapes("Rectangle 5").OnAction = ""

To change:
ActiveSheet.Shapes("Rectangle 5").OnAction = "New Macro Name"

HTH
Regards,
Howard

"Ken Loomis" wrote in message
...
I would like to change or remove a macro assignment to buttons.

I use this to change the text of a shape that I use as a button:

ActiveSheet.Shapes("Rectangle 5").Select
Selection.Characters.Text = "Mark Anomolies"

How would I change or remove the macro assignment to that button?

TIA,
Ken




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use Macro To Change Which Macro Assigned To Command Button CVinje Excel Discussion (Misc queries) 0 May 25th 10 09:55 PM
Command Button Assignment Bill Martin Excel Discussion (Misc queries) 2 January 1st 06 02:50 AM
Macro assignment disappears duuxxyy Excel Programming 0 June 30th 05 09:30 AM
Relative Macro Assignment esskaykay Excel Programming 3 April 25th 04 10:55 PM
Macro assignment to button gets reassigned John Gittins Excel Programming 1 August 5th 03 10:18 PM


All times are GMT +1. The time now is 04:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"