LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA-Make Custom Menu Item Fire

Hello,
I am trying to make my userform "frmSearch" able to be fired up fro
the regular menu. It is loaded right away, but the user needs to b
able to close it and reopen whenever they need it. My code creates th
Menu item, but when I click on it, it does nothing. I have inserted m
code below. I need help by the "TODO: show search agentThanks i
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 Su

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2000 Custom Menu Item Larry Bird Excel Discussion (Misc queries) 0 November 8th 05 08:25 PM
in a excel file, how to make a menu item for the .xls file that when clicked on it runs myform.show? example plz Daniel Excel Worksheet Functions 1 July 7th 05 03:52 AM
How do I make Microsoft Query a menu item? gff Excel Discussion (Misc queries) 0 May 6th 05 12:41 AM
Setting OnAction of custom menu item? Ed[_18_] Excel Programming 12 May 10th 04 02:55 PM
Custom Menu Item specific to a workbook Tommy T Excel Programming 1 January 23rd 04 07:34 PM


All times are GMT +1. The time now is 08:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"