LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Textboxes and labels in Userform??

Fine. So as mentioned in the below post; making the visible property of 2
labels within the control mouse move will help..

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

If this post helps click Yes
---------------
Jacob Skaria


"TotallyConfused" wrote:

Thank you Jacob. This new request is for a different project similar to my
previous post. This one I need to add another label. I need to add another
label and only visible at the same time mouse is over text box. So both
labels will be visible only if mouse is over text box. Thank you for all
your help and expertise.


"Jacob Skaria" wrote:

Hi again

--What if you add one more label to a text box and make it visible in
MouseMove event of the control...Make sure you hide this in Userform mouse
move event

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

--Instead of this approach why dont you try the other approach suggested in
your previous post..ie; to have a frame and have all the controls insider the
frame. Display a permanent label outside the frame (within the same userform)
and instead of hiding the labek; change the display text when you move your
mouse from one control to another....


If this post helps click Yes
---------------
Jacob Skaria


"TotallyConfused" wrote:

I have the following code for a userform. However, I want to know if I can
add another label with descriptions. Instead of one label being visible I
would like two labels to be visible when mouse moves over the textbox. Can
this be done? If so how do I add this to the code below. I would add
another label to all the textboxes. Thank you for any help you can provide.


Private Sub UserForm1_MouseMove(ByVal Button As Integer, ByValShift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label1.Visible = True
Me.Label1.Visible = False
Me.Label2.Visible = True
Me.Label2.Visible = False
Me.Label3.Visible = True
Me.Label3.Visible = False
Me.Label4.Visible = True
Me.Label4.Visible = False
Me.Label5.Visible = True
Me.Label5.Visible = False
Me.Label6.Visible = True
Me.Label6.Visible = False
Me.Label7.Visible = True
Me.Label7.Visible = False

End Sub

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 Textbox2_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label7.Visible = True

End Sub
Private Sub Textbox3_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label4.Visible = True

End Sub
Private Sub Textbox4_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label2.Visible = True

End Sub
Private Sub Textbox5_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label5.Visible = True

End Sub
Private Sub Textbox6_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label6.Visible = True

End Sub
Private Sub Textbox7_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label3.Visible = True

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

End Sub
Private Sub label2_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label2.Visible = False

End Sub
Private Sub label3_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label3.Visible = False

End Sub
Private Sub label4_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label4.Visible = False

End Sub
Private Sub label5_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label5.Visible = False

End Sub
Private Sub label6_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label6.Visible = False

End Sub
Private Sub label7_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
Me.Label7.Visible = False

End Sub


 
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
Text wrap problem when printing labels/textboxes chipshot Excel Discussion (Misc queries) 1 September 30th 05 10:21 PM
UserForm TextBoxes Rob Excel Discussion (Misc queries) 2 August 6th 05 03:07 AM
userform & textboxes beginner Excel Programming 3 July 27th 04 10:56 AM
userform textboxes Jo[_6_] Excel Programming 4 October 21st 03 07:15 PM
Clear Textboxes, Labels, and Checkboxes milo[_2_] Excel Programming 1 October 16th 03 09:21 PM


All times are GMT +1. The time now is 10:33 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"