I’m hitting a wall with the oEvent AS OBJECT parameter passing to a sub or function.
I have successfully used the parameter to refer to an active button or control. That’s understandable, and it works.
However, can I also pass OTHER arguments to the same function or sub which receives the oEvent? For example:
functionName(oEvent AS OBJECT, sFirstName AS STRING, sLastName AS STRING)
Every time I try to add any other parameters, an error message pops:
Message: wrong number of parameters!
It’s horrifically annoying beyond all reckoning and imagination! It almost seems like an either/or situation. Either you write a function with multiple parameters OR you write it with one parameter, the oEvent. If this is true, it SEVERELY limits the functionality of any function or sub that needs to use the oEvent AND receive other parameters. By definition, a function is supposed to receive input and give an output. If it can’t receive input, it’s completely useless! I can’t imagine this is true, otherwise functions and subs don’t allow reuse of code (defeating their purpose). I’m a tad novice with this form of Basic, so maybe I’m missing something.