View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Norton Norton is offline
external usenet poster
 
Posts: 2
Default How can i Create

Thx for your advise!


"Norton" wrote in message
...
Hi all,


I would like to add some menu Item based on the following code but it
returns failed. The reason is that i pass an parameter on "OnAction" which
excel file cannot find the macroname RunTest(1)

Here is my code
==========================================
MenuBars(xlWorksheet).Menus(menuName).MenuItems.Ad d Caption:=itemName,
OnAction:=RunTest(1)



Public Sub RunTest(ByVal iParameter as integer)
Msgbox(iParameter)
End Sub
===================================

What can i do?


Regards,
Norotn