Excel VBA Form problem

  • Thread starter Thread starter Matt000
  • Start date Start date
M

Matt000

ok this is for my a-level coursework... i have nearly completed it but i
wanted to make it a bit better by adding a custom form to let the user
make a selection.

Ok i have made my form and all the buttons on it and their functions
but i just cannot get the form to appear. I just want the form to
appear when i click on a button.

My form is called question and this is the code i am using to try and
run it:

Sub Question()
Question.Show
End Sub

I know it's completely wrong but i've never really used VB before and
the microsoft help is rubbish.
Please help!!
 
Matt;

To overcome confusions, give your forms any name preceding with frm.
Don't give it the same name as the Procedure which is also called question.

So:

Private Sub frmQuestion_Show()
frmQuestion.Show
End Sub

Mark.

More Excel ? www.rosenkrantz.nl or (e-mail address removed)
 
Matt

The open form macro should also be in a general module and
not the form module. I presume you are going to assing a
button to the macro are you will also have to remove the
Private statement.

Regards
Peter
 
Back
Top