PDA

View Full Version : First Step in VBA



Mandy
06-27-2007, 12:27 AM
Hello to all :hi:
i am new to VBA(Excel). this is my first step.
i need help
hop i will get.

i had placed a command button and text box in excel sheet.
the code behind the button is given below.


Private Sub CommandButton1_Click()
Text1.Text = "First Step"
End Sub


but problems is when i move mouse over the button its shaped is changed into 4 directional arrow, that mean i can move the button from one place to another but cant click the button to run the code writing behind it:dunno

so plz can any one tell me how to run the code writen behind the command button.

plz:mkay

Thanks to Every one

Edited 27-Jun-07 by geekgirlau. Reason: insert vba tags

geekgirlau
06-27-2007, 12:49 AM
Welcome to the Board!

It sounds like you used the Control Toolbox to create your button - you need to take it out of design mode. The first button on the Control Toolbox toolbar is Design, which turns design mode on and off.

For future reference, a couple of small things:

When you post code, select the text after you paste it into your post, then click on the VBA button - I've done this for your post above, so you can see what it looks like.
Make sure you use a title for your thread that describes your problem, rather than a generic "Help" title - you're much more likely to get a quick response this way.

Mandy
06-27-2007, 12:58 AM
First of all thanks.

the instruction given by u i will keep always in my mind.

once again thanks.