Quite simple, once you've got the hang of it. Here's a quick guide:-
Open the VB Editor (Alt+F11) and choose Insert, Userform. This will create a blank userform which you can add controls to. Make sure the Toolbox is visible (View, Toolbox) and then click the Textbox control (the one with ab| on it) and then click the userform. This will add a textbox to your userform. Then do the same with the command control (the grey rectangle). Double click the command button. This should create a blank procedure for CommandButton1_Click. Type this:-
Private Sub CommandButton1_Click()
MsgBox "The text entered in the textbox was " & Me.TextBox1.Text
End Sub
Now press F5 (run), type something in the textbox and press the command button. You should see a message telling you what you typed into the textbox. Congratulations! You've created a userform!
You can show the userform from a macro by doing this:-
Sub Test()
Userform1.Show
End Sub
HTH,
D
This message was edited by dk on 2002-03-08 11:38