Message Box Help
On Feb 12, 1:06*pm, Sam wrote:
I'm learning the VBA and have created a USERFORM that has several text boxes.
*One of the boxes is and address field with multi-line option. *I would like
a small message box to "pop" up when the user enters that box telling them
how to make the 2nd line (CTRL+Enter) -- the dissapear when leaving that box.
Is this possible? *
--
"To dream of the person you would like to be is to waste the person you are."
Hi Sam
First of all, you might consider to change the properties of your
textfield to:
EnterKeyBehavior = True
and
MultiLine = True
That way, the User doesn't need to hit Ctrl + Enter to change the
line, Enter will be sufficent.
If you still want to tell the user what to do, you could add a Label
to the form.
In the onEnter event of your field you set the Label to visible, in
the onExit event you set it to invisible, like that:
Private Sub TextBox1_Enter()
Me.Label1.Visible = True
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Me.Label1.Visible = False
End Sub
Private Sub UserForm_Initialize()
Me.Label1.Visible = False
End Sub
hope that helps
Carlo
|