G
GeorgeJ
I am using Excell 2007 and am trying to set up a command button on a
worksheet to execute a VB routine. Here is what I am doing
While in a particular worksheet, I select the Developer tab and then select
Insert/Form Controls/Button
This creates a new button, in this instance with the name “Button 7â€
Using the VCB Editor, I create, in a pre-existing Module,
Private Sub Button7_Click()
MsgBox "Button 7 pressed"
End Sub
Then when I go back into the sheet on which the button was created and
press the button, I do indeed get the message box “Botton 7 pressed†which is
encouraging.
When I right click on the button, I get some limited ability to edit the
button's properties, but I *cannot* change the button’s name. My questions
are
1) How might I get the ability to see the more of button’s
properties,including its name? Might I get the ability to change the
button’s name ? I have been playing around and eliminating buttons and now
when I create a new button it will be Button 8, but I have already
eliminated buttons 5, 6, & 7. Is there any way to get Excel to create
buttons with other names?
2) When I’m finished developing my app, I *don’t* want the user to be
able to inadvertantly right click on the button and be able to change its
properties, such as its location, size, text, etc. How might I prevent this?
worksheet to execute a VB routine. Here is what I am doing
While in a particular worksheet, I select the Developer tab and then select
Insert/Form Controls/Button
This creates a new button, in this instance with the name “Button 7â€
Using the VCB Editor, I create, in a pre-existing Module,
Private Sub Button7_Click()
MsgBox "Button 7 pressed"
End Sub
Then when I go back into the sheet on which the button was created and
press the button, I do indeed get the message box “Botton 7 pressed†which is
encouraging.
When I right click on the button, I get some limited ability to edit the
button's properties, but I *cannot* change the button’s name. My questions
are
1) How might I get the ability to see the more of button’s
properties,including its name? Might I get the ability to change the
button’s name ? I have been playing around and eliminating buttons and now
when I create a new button it will be Button 8, but I have already
eliminated buttons 5, 6, & 7. Is there any way to get Excel to create
buttons with other names?
2) When I’m finished developing my app, I *don’t* want the user to be
able to inadvertantly right click on the button and be able to change its
properties, such as its location, size, text, etc. How might I prevent this?