ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   linebreak in ControlTipText? (https://www.excelbanter.com/excel-programming/361434-linebreak-controltiptext.html)

RB Smissaert

linebreak in ControlTipText?
 
Would there be an easy way to get linebreaks in ControlTipTexts?
I have seen a VB project from Brad Marinez that does this with subclassing
and the API:
http://btmtz.mvps.org/vbbubble/
and it might be possible to transfer this to VBA, but it won't be that
simple and I wonder
if there is a simpler way to this or if anybody has done this already in VBA
as in the above
VB project.

RBS


Dave Peterson

linebreak in ControlTipText?
 
Saved from a previous post.

How about just putting a label over the control and that control in a frame.

Then when you mouse over the frame, it'll hide the label. But when you mouse
over the control, you'll show the label.

Option Explicit
Private Sub CommandButton1_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

RB Smissaert wrote:

Would there be an easy way to get linebreaks in ControlTipTexts?
I have seen a VB project from Brad Marinez that does this with subclassing
and the API:
http://btmtz.mvps.org/vbbubble/
and it might be possible to transfer this to VBA, but it won't be that
simple and I wonder
if there is a simpler way to this or if anybody has done this already in VBA
as in the above
VB project.

RBS


--

Dave Peterson

RB Smissaert

linebreak in ControlTipText?
 
Good idea, will give that a try.

RBS

"Dave Peterson" wrote in message
...
Saved from a previous post.

How about just putting a label over the control and that control in a
frame.

Then when you mouse over the frame, it'll hide the label. But when you
mouse
over the control, you'll show the label.

Option Explicit
Private Sub CommandButton1_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

RB Smissaert wrote:

Would there be an easy way to get linebreaks in ControlTipTexts?
I have seen a VB project from Brad Marinez that does this with
subclassing
and the API:
http://btmtz.mvps.org/vbbubble/
and it might be possible to transfer this to VBA, but it won't be that
simple and I wonder
if there is a simpler way to this or if anybody has done this already in
VBA
as in the above
VB project.

RBS


--

Dave Peterson




All times are GMT +1. The time now is 08:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com