Another approach - Program Command Button

  • Thread starter Thread starter EMoe
  • Start date Start date
E

EMoe

Hello World!!!

Is their a code for a command button, in a user form, that will put
certain value in a cell when pushed.

I want to create a userform with command buttons. If I push one o
these buttons, I want that button to put, lets say a number 7 in cel
D4; so on, so on.

Is this possible? How?

Thanks,
EMo
 
in the vbe, place you command button and then double click on it.

This will put the Click event declaration in the Userform Module

Private Sub CommandButton1_Click()

End Sub

then just put your code in there

Private Sub CommandButton1_Click()
Worksheets("Sheet1").Range("D4").Value = 7
End Sub
 
Hello!

I was wondering how to call up the "save as" box with code (as if yo
went to File and selected Save As...). I tried through the macr
recorder, but it wouldn't let me stop recording when the box was open.

Thanks,
M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top