N
Norton
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.Add Caption:=itemName,
OnAction:=RunTest(1)
Public Sub RunTest(ByVal iParameter as integer)
Msgbox(iParameter)
End Sub
===================================
What can i do?
Regards,
Norotn
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.Add Caption:=itemName,
OnAction:=RunTest(1)
Public Sub RunTest(ByVal iParameter as integer)
Msgbox(iParameter)
End Sub
===================================
What can i do?
Regards,
Norotn