Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default Message Box Help

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."
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 367
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Message Box Help

Sam,
You can use the ControlTipText Property which will show your message when
the mouse hovers over the control. eg:

Textbox1.ControlTipText = "to make the 2nd line use (CTRL+Enter)"

see Help for more info.

--
JB


"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."

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
replace VBA run-time error message with custom message BEEJAY Excel Programming 13 July 14th 06 03:59 PM
Replace Excel Message w/Custom Message Kevin R Excel Programming 1 May 18th 06 04:13 PM
Intercept/replace standard 'cell protected' message with my own message? KR Excel Programming 3 March 16th 06 02:31 PM
Opening an attachment of a message that has a message as attachmen vetron Excel Programming 0 January 30th 06 06:17 PM
Displaying a message in a message box without requiring user to click anything to proceed Android[_2_] Excel Programming 2 June 25th 04 06:44 PM


All times are GMT +1. The time now is 10:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"