USERFORM QUESTIONS ??

J

jay dean

Hi - I have 2 questions:

1. How do I minimize and maximize a userform on my screen?

2. How do I keep combobox1 hidden but only have it shown when I point
the mouse in its location?

Thanks
Jay



*** Sent via Developersdex http://www.developersdex.com ***
 
H

Harald Staff

jay dean said:
Hi - I have 2 questions:

1. How do I minimize and maximize a userform on my screen?

See FormFun as http://www.bmsltd.co.uk/Excel/SBXLPage.asp#VBA -which I
believe is as close as you get.
2. How do I keep combobox1 hidden but only have it shown when I point
the mouse in its location?

Put a Label1 in the exact same position as Combobox1. Set its caption to
nothing, and its backstyle to transparent if your form is decorated.
Userform code:

Private Sub UserForm_Initialize()
Me.ComboBox1.Visible = False
End Sub

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

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

HTH. Best wishes Harald
 

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