View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default can I make a general object event procedure?

Wazooli,
Not sure if this is what you mean, but you can pass the object (or rather a
pointer to it ?) to a sub/function.

Private Function a_change(MyObject as Object) as long
'Decide what to do based on the type of object
If MyObject Is ComboBox Then.....


You could call this from any objects' event procedure
RetVal=a_change(ThisObject)

NickHk

"Wazooli" wrote in message
...
Is there a way to make event procedures generic? For example, if I create
and populate a list or combo box via code, can I pass the address of the
created box to a _change() procedure?

wazooli