LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default SubMenu .action argument

I have created a customized menu with submenus which I want to have run
the sub procedure "EnterInvoice" that passes a variable "VendorName"
from the .OnAction part of the With SubMenu CommandButton to the macro.
I have declared the argument in the sub as:

Sub EnterInvoice(ByVal VendorName)

but can't figure out how to do it.

I've tried different versions of the following but can not get the
syntax to work.

Set SubMenuItem = MenuItem.Controls.Add(Type:=msoControlButton)
With SubMenuItem
.Caption = "Co&mmissary Order"
.OnAction = "EnterInvoice"(Commissary)
End With

Ideas?

Thanks

 
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
Need Function Argument pasekm Excel Worksheet Functions 4 March 18th 06 11:14 PM
Passing a UDF as an argument to a UDF puff Excel Discussion (Misc queries) 3 February 23rd 06 09:46 PM
How do I set up an argument which asks for multiple criteria HiTekDiver Excel Discussion (Misc queries) 3 August 29th 05 11:32 PM
text argument in vlook up which has a "" carlosgdlf Excel Worksheet Functions 6 August 3rd 05 01:46 PM
read in Vlookup an argument that has quotations(") carlosgdlf Excel Discussion (Misc queries) 1 August 2nd 05 05:56 PM


All times are GMT +1. The time now is 05:09 PM.

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

About Us

"It's about Microsoft Excel"