View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JTaylor JTaylor is offline
external usenet poster
 
Posts: 4
Default 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