View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default Simple form question

Hi,
- By "Behind the Form" you mean within the Frm_Initial code module, don't you?
- are you really sure the buttons are called Cb1Ok and Cb2Cancel, and not
just cbOK and cbCancel, or any other names?

Regards,
Sébastien

"Stuart" wrote:

Sheet1 has a commandbutton. When clicked, a form containing one label, an Ok
button and a Cancel button, loads.
I cannot get the buttons to fire the events!

In sheet1 I have:
Private Sub CommandButton1_Click()
Call HandleTheForms
End Sub

In module1 I have:
Private Sub HandleTheForms()
Frm_Initial.Show
End Sub

Behind the form, I have:
Private Sub Cb1Ok_Click()
MsgBox "Success with Ok_Click"
End Sub

Private Sub Cb2Cancel_Click()
MsgBox "Success with Cancel_Click"
Exit Sub
End Sub

Help, feel like I've forgotten what little I thought I knew.

Regards.