Control Tip Text Question

T

TotallyConfused

I am using "ControlTipText" to identify the objects in my Userform. Is there
a way to wrap text this "ControlTipText"?? If not, is there any other way to
have this informtion for the user? Thank you for any help you can provide.
 
J

Jacob Skaria

You can place the controls within a frame and have a multi-line label placed
in your form. Use the mousemove event to display/hide a label for each
control or display/clear a fixed label (for all controls) using the below
code...You can try out the below by placing a textbox within a frame and
placing a multi-line label on your form

Option Explicit
Private Sub Textbox1_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Me.Label1.Visible = True
End Sub

Private Sub Frame1_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Me.Label1.Visible = False
End Sub


Alternately, review the bleow link by Andy Pope and download a demo on
handling the help and help text.
http://www.andypope.info/vba/whatsthishelp.htm

If this post helps click Yes
 
T

TotallyConfused

Thank you for your response. I have two columns in a Frame with checkboxes.
I tried the code below as instructed and I am able to make it work except for
one thing. Lable 280 and stay open even after I move away from the checkbox
470. What am I doing wrong. Also when I open the Userform the label is
visible. i only want the label to be seen if mouse is over the checkbox.
Can you please review my code and tell me what I am doing wrong. Thank you
very much for all your help.


Private Sub CheckBox470_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As
Single)
Me.Label280.Visible = True
End Sub
Private Sub Label280_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As
Single)
Me.Label280.Visible = False
End Sub

Private Sub CheckBox606_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As
Single)
Me.Label281.Visible = True
End Sub
Private Sub Label281_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As
Single)
Me.Label281.Visible = False
End Sub
 
J

Jacob Skaria

--Set the 'Visible' property of the labels to False from the property window

--You didnt try the frame control..No problems. Leave it. If you are not
using a frame control you can use the below code which sets the visible
property to False in UserForm Mouse Move event

Private Sub UserForm_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Me.Label281.Visible = True
Me.Label281.Visible = False
End Sub

Private Sub CheckBox470_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Me.Label280.Visible = True
End Sub

Private Sub Label280_MouseMove(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Me.Label280.Visible = False
End Sub


If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top