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

asked on

Creating dynamic handlers

Hey there. I'm attempting to call a user defined function (callbyname) on a dynamically created button using add handler.

AddHandler button.Click, AddressOf CallByName(form, "function_name", CallType.Method)

Open in new window


unfortunatly i keep getting this error:
'AddressOf' operand must be the name of a method (without parentheses)

Any help would be great :)

Many Thanks
Ben
SOLUTION
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia 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
ASKER CERTIFIED SOLUTION
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 lazypeople

ASKER

Thanks :)
Not a problem, glad I was able to help.  ;=)