How do I make a Visual Basic 2008 function only access through events?
I want some event handling functions to be only accessible via raised events and not called from the program.
For example:
Public Event Event1(Byval TheText as string)
private sub Event1Handler(Byval TheText as string) handles me.Event1
msgbox("Hi")
end sub
I want this code to execute a function: RaiseEvent Event1("Hi")
But I don't want this code to do the function: Event1Handler("Hi")
Is there a declaration or some other way to do this?
+2
source to share