ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Tooltip or StatusBar msgs for menu items (https://www.excelbanter.com/excel-programming/378814-tooltip-statusbar-msgs-menu-items.html)

JTaylor

Tooltip or StatusBar msgs for menu items
 
Hello,

Is there a way to show tooltips for custom CommandBar menu 'items'? None
appear even though I've set the 'TooltipText' property for each item, and the
'Show ScreenTips on toolbars' option in the Customize window is checked.

Or, if this is not doable in xl2003 then is there a way to show a custom
message when the user does a mouse-over on a menu item in a drop-down?

Thanks

Chip Pearson

Tooltip or StatusBar msgs for menu items
 
The following code works for me.

Dim CmdBar As Office.CommandBar
Dim Ctrl As Office.CommandBarControl
Set CmdBar = Application.CommandBars.Add(Name:="MyName", temporary:=True)
Set Ctrl = CmdBar.Controls.Add(Type:=msoControlButton, temporary:=True)
With Ctrl
.Caption = "Click Me"
.TooltipText = "This is the Tooltip Text"
.Enabled = True
.Style = msoButtonCaption
End With
CmdBar.Visible = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)



"jtaylor" wrote in message
...
Hello,

Is there a way to show tooltips for custom CommandBar menu 'items'? None
appear even though I've set the 'TooltipText' property for each item, and
the
'Show ScreenTips on toolbars' option in the Customize window is checked.

Or, if this is not doable in xl2003 then is there a way to show a custom
message when the user does a mouse-over on a menu item in a drop-down?

Thanks




JTaylor

Tooltip or StatusBar msgs for menu items
 
How about submenu items - "MenuItem Tooltip Text" in the revision below
doesn't appear upon mouse-over;

Dim CmdBar As Office.CommandBar
Dim Ctrl As Office.CommandBarControl
Dim ctlMenuItem As CommandBarControl

Application.CommandBars("MyName").Delete

Set CmdBar = Application.CommandBars.Add(Name:="MyName", Temporary:=True)
Set Ctrl = CmdBar.Controls.Add(Type:=msoControlPopup, Temporary:=True)

With Ctrl
.Caption = "MainMenu"
.TooltipText = "MainMenu Tooltip Text"
.Enabled = True
End With

Set ctlMenuItem = Ctrl.Controls.Add(Type:=msoControlButton, Temporary:=True)
With ctlMenuItem
.Caption = "Click Me"
.TooltipText = "MenuItem Tooltip Text"
.Enabled = True
.Style = msoButtonCaption
End With
CmdBar.Visible = True



"Chip Pearson" wrote:

The following code works for me.

Dim CmdBar As Office.CommandBar
Dim Ctrl As Office.CommandBarControl
Set CmdBar = Application.CommandBars.Add(Name:="MyName", temporary:=True)
Set Ctrl = CmdBar.Controls.Add(Type:=msoControlButton, temporary:=True)
With Ctrl
.Caption = "Click Me"
.TooltipText = "This is the Tooltip Text"
.Enabled = True
.Style = msoButtonCaption
End With
CmdBar.Visible = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)



"jtaylor" wrote in message
...
Hello,

Is there a way to show tooltips for custom CommandBar menu 'items'? None
appear even though I've set the 'TooltipText' property for each item, and
the
'Show ScreenTips on toolbars' option in the Customize window is checked.

Or, if this is not doable in xl2003 then is there a way to show a custom
message when the user does a mouse-over on a menu item in a drop-down?

Thanks





Chip Pearson

Tooltip or StatusBar msgs for menu items
 
I see what you mean. I can't get the ToolTip text to display.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"jtaylor" wrote in message
...
How about submenu items - "MenuItem Tooltip Text" in the revision below
doesn't appear upon mouse-over;

Dim CmdBar As Office.CommandBar
Dim Ctrl As Office.CommandBarControl
Dim ctlMenuItem As CommandBarControl

Application.CommandBars("MyName").Delete

Set CmdBar = Application.CommandBars.Add(Name:="MyName", Temporary:=True)
Set Ctrl = CmdBar.Controls.Add(Type:=msoControlPopup, Temporary:=True)

With Ctrl
.Caption = "MainMenu"
.TooltipText = "MainMenu Tooltip Text"
.Enabled = True
End With

Set ctlMenuItem = Ctrl.Controls.Add(Type:=msoControlButton,
Temporary:=True)
With ctlMenuItem
.Caption = "Click Me"
.TooltipText = "MenuItem Tooltip Text"
.Enabled = True
.Style = msoButtonCaption
End With
CmdBar.Visible = True



"Chip Pearson" wrote:

The following code works for me.

Dim CmdBar As Office.CommandBar
Dim Ctrl As Office.CommandBarControl
Set CmdBar = Application.CommandBars.Add(Name:="MyName", temporary:=True)
Set Ctrl = CmdBar.Controls.Add(Type:=msoControlButton, temporary:=True)
With Ctrl
.Caption = "Click Me"
.TooltipText = "This is the Tooltip Text"
.Enabled = True
.Style = msoButtonCaption
End With
CmdBar.Visible = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)



"jtaylor" wrote in message
...
Hello,

Is there a way to show tooltips for custom CommandBar menu 'items'?
None
appear even though I've set the 'TooltipText' property for each item,
and
the
'Show ScreenTips on toolbars' option in the Customize window is
checked.

Or, if this is not doable in xl2003 then is there a way to show a
custom
message when the user does a mouse-over on a menu item in a drop-down?

Thanks








All times are GMT +1. The time now is 05:09 PM.

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