Link to home
Start Free TrialLog in
Avatar of RIAS
RIASFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Address of operand must be the name of a method+vb.net

Hi,
I am trying to call the method


 AddHandler menuItem4.Click, AddressOf CopyEditVehMain_Click(dgv)
I get an error : addressof operand must be the name of a method+vb.net


Thanks
ASKER CERTIFIED SOLUTION
Avatar of Shaun Kline
Shaun Kline
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RIAS

ASKER

Thanks but need a parameter
Please re-read my previous comment.
Doesn't work that way.
You are adding the location of a method that the event will use.  When the event is raised then the parameters are supplied.

(You don't create a string class to hold "Hello" and a different class with methods etc to hold "world"  - you create variables of that general type)