Thread: Button in Form
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Button in Form

Open the VB editor by pressing Alt + F11 and select your form from the
project window. Right click the command button on the form and select view
code.
Then enter the code below.

Private Sub CommandButton1_Click()
MsgBox ("button clicked... ")
End Sub

Re-post if it still don't work.


"bbussoloti" wrote:

I have a problem,
there´s a form, which is accessable via a single button in a sheet.
In this form there´s another button called GO, so i have:

Private Sub Go_Click()
MsgBox ("button clicked... ")
End Sub

When I click this button in my form, nothing happen... the MsgBox warning
does not shows.

What can be the problem here?