Getting started with a User Form

  • Thread starter Thread starter Big Chris
  • Start date Start date
B

Big Chris

Help!

I want to do something that looks incredibly simple compared to the
many complex queries answered on this great website, but just don't
know where to get started.

I want a dialog box with help information to come up when a help button
is pressed, and for this box to disappear when the user clicks on
'OK'.

I have created the user form itself but have spent hours trying to find
out how I can get the box just to appear on this click and disappear
when OK is clicked. Please can anyone help me??

Also, I've created a button and entered the text 'OK' on it, but my
searches for help suggest that there is an actual 'OK' button that I
can add......is there?

I hope this is all clear, and thnks in advance for any help you can
offer to this newbie!
 
Hi,
If I understand you correctly the following should
work:

Go to the VBA editor and add a code module to your
project and make a new sub:

Sub DisplayHelp() 'Or whatever you want to call your Sub

HelpForm.Show 'Substitute HelpForm with your form name

End Sub

On the form you have made dbl click on the button you've
labelled OK. You'll then get up a code window with the
first line something like

Private Sub Commandbutton1_Click

depending on the name of your commandbutton. Enter the
following code so it looks like this:

Private Sub Commandbutton1_Click

Unload Me

End Sub

Finally for the button you have on the sheet to display
your form you need to assign the Sub DisplayHelp.

jacob
 
Jacob,

Don't know how to contact you directly, but just wanted to say thank
you very much for your time and help. It all works perfectly, and your
help is much appreciated!.
 
Back
Top