Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax to add a hyperlink to a pulldown menu 1

Status
Not open for further replies.

nodrog77

Programmer
Sep 26, 2007
47
AU
This is probably an easy question but I couldn't find the syntax to do this anywhere. I just want to use VBA to modify a pulldown menu to open a word document (in excel). I can do it manually so there must be a way to do it using VBA

Note that this is excel 2003.

Set Btn_HelpSupps = AdminPulldown.Controls.Add(Type:=msoControlButton)
With Btn_HelpSupps
.FaceId = 49 ' Question Mark
.OnAction = "J:\helpfiles\helpdocs\MacroHelp.doc" ,-this isn't it - I know it's via hyperlinks somehow.
.Caption = "Supplementary Macro Help "
.TooltipText = "Supplementary Valutions Macro Help"
.Style = msoButtonIconAndCaption
.Enabled = True
.Tag = TheVersionTag
End With
 
Use following button's settings:
Code:
...
  .HyperlinkType = msoCommandBarButtonHyperlinkOpen
  .TooltipText = "J:\helpfiles\helpdocs\MacroHelp.doc"
...


combo
 
Thanks Combo,
I never would have guessed it was via the .tooltip property.

Have a good one,

Lea
 
Neither I, initially it was only my guess after finding the HyperlinkType property and reading sample code. Personally I'd rather execute a macro to leave a possibility to define a tooltip and to avoid displaying the web toolbar.
Thanks for the *.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top