Menus

B

Bob Phillips

Set ctl = Commandbars("Worksheet Menu
Item").Controls("Tools").Controls("Add-Ins...")

as an example

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
T

tkaplan

Private Sub Workbook_Open()

Set ctl = CommandBars("Worksheet Menu
Item").Controls("Edit").Controls("Links...")

End Sub

I put this in and it returned an error.

I am trying to go to the menu option: Edit / Links

What am I doing wrong?

Thank you.
 
B

Bob Phillips

Try this instead

Private Sub Workbook_Open()
Dim ctl As CommandBarControl

Set ctl = CommandBars("Worksheet Menu Bar") _
.Controls("Edit").Controls("Links...")

End Sub



--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Top