Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if you code is as it is shown in your email, you need to modify it to look
like this: With Application.CommandBars(1).Controls.Add(msoControl Popup) .Caption = "Agent" .OnAction = "Show_frmSearch" 'TODO: show search agent End With -- Regards, Tom Ogilvy "d_rodman " wrote in message ... Hello, I am trying to make my userform "frmSearch" able to be fired up from the regular menu. It is loaded right away, but the user needs to be able to close it and reopen whenever they need it. My code creates the Menu item, but when I click on it, it does nothing. I have inserted my code below. I need help by the "TODO: show search agentThanks in advance, I appreciate any help. In "This Workbook:" Private Sub Workbook_Open() frmSearch.Show Dim con For Each con In Application.CommandBars(1).Controls If con.Caption = "Agent" Then con.Delete End If Next With Application.CommandBars(1).Controls.Add(msoControl Popup) Caption = "Agent" OnAction = "Show_frmSearch" 'TODO: show search agent End With In a module: Public Sub Show_frmSearch() frmSearch.Show End Sub --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2000 Custom Menu Item | Excel Discussion (Misc queries) | |||
in a excel file, how to make a menu item for the .xls file that when clicked on it runs myform.show? example plz | Excel Worksheet Functions | |||
How do I make Microsoft Query a menu item? | Excel Discussion (Misc queries) | |||
Setting OnAction of custom menu item? | Excel Programming | |||
Custom Menu Item specific to a workbook | Excel Programming |