How do I display a ControlTip for a disabled control

K

Ken Soenen

Is there any way I can display the Control Tip for a control that is
disabled?

thanks
 
D

Dave Peterson

Like on a userform?

How about just having the thing that disables the control also change the
tooltip.

Option Explicit
Private Sub CommandButton2_Click()
With Me.CommandButton1
.ControlTipText = ""
.Enabled = False
End With
End Sub
Private Sub UserForm_Initialize()
With Me.CommandButton1
.ControlTipText = "hi there"
.Enabled = True
End With
End Sub

And the thing that enables the control would set the tooltip back.
 
K

Ken Soenen

Dave, I was thinking more in terms of the following: When I open Excel,
The icons for the UNDO, PASTE... , I assume are disabled (maybe that's a bad
assumption) and yet when you bring the cursor over them it still displays
the toolTip. I want to do that on a userform.
Thanks
 
D

Dave Peterson

Ooh. I got that completely backwards, huh?

Maybe you could put a frame under the control and use a tooltip that describes
the disabled control.
 

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