-
adding events
hey, ive made and activeX control, i now want to add a event to it. i want this to be called onclick, which runs when its clicked. how is it done. ive been to add proccedure and added the event, it added
but thats all? any help would be great
thanks:D
-
use RaiseEvent
After you add the event, you have to use the RaiseEvent keyword in the function or sub that you want the event to happen in
Public Event Slap()
' mock function
Public Function MakeMistake()
RaiseEvent Slap
In your client code, you can use this event like any other (onclick, etc) for your ActiveX control:
Public Sub YourActiveXControl_Slap()
-