Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default Creating a Command Button on a worksheet

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 buttons name. My questions
are

1) How might I get the ability to see the more of buttons
properties,including its name? Might I get the ability to change the
buttons 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 Im finished developing my app, I *dont* 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?


--
-regards
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 of Forms Command-button on Worksheet Jim May Excel Discussion (Misc queries) 12 November 13th 06 06:08 PM
Worksheet Command Button will not work willpwr Excel Worksheet Functions 0 May 16th 06 08:13 PM
Linking one worksheet to another by click on a command button Ken Vo Excel Discussion (Misc queries) 0 January 6th 06 12:41 AM
How do I add a command button on a worksheet to "paste" from the . [email protected] Excel Worksheet Functions 3 March 13th 05 06:25 PM
How do I add a command button on a worksheet to "paste" from the . Jalifid Excel Worksheet Functions 0 March 13th 05 03:01 PM


All times are GMT +1. The time now is 08:41 AM.

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

About Us

"It's about Microsoft Excel"