C
Craig Brandt
I need someone to give me a few buzz words and point me to some reference
work so that I can get started.
I want to place several buttons on a worksheet that will help the user move
around. I need to create a button then upon activation change the Caption
and execute a macro that will create a button on another sheet. upon
activation of this button, I will execute a macro and at the end of the
macro, delete the button.
In order to work with the button I need to name it then address it to make
the changes and ultimately delete it.
Here is the code I used to create the first button:
ActiveSheet.Buttons.Add(1245, 16, 64, 16).Select
Selection.Caption = "AutoFocus On"
Selection.Name = "AutoFocusBut"
Selection.OnAction = "FocusOn"
In the routine "FocusOn" I want to look at the caption to determine the
needed activity, then change the caption. Up to now the button has been
selected. It will not be when I come back. How do I select the button, and
test the caption.
I thought I knew, but obviously I am missing something.
References anyone?
Craig
work so that I can get started.
I want to place several buttons on a worksheet that will help the user move
around. I need to create a button then upon activation change the Caption
and execute a macro that will create a button on another sheet. upon
activation of this button, I will execute a macro and at the end of the
macro, delete the button.
In order to work with the button I need to name it then address it to make
the changes and ultimately delete it.
Here is the code I used to create the first button:
ActiveSheet.Buttons.Add(1245, 16, 64, 16).Select
Selection.Caption = "AutoFocus On"
Selection.Name = "AutoFocusBut"
Selection.OnAction = "FocusOn"
In the routine "FocusOn" I want to look at the caption to determine the
needed activity, then change the caption. Up to now the button has been
selected. It will not be when I come back. How do I select the button, and
test the caption.
I thought I knew, but obviously I am missing something.
References anyone?
Craig