I have created a class to manage a series of UserForms to collect data, and in that class I have it passing a callback to each user form using "CallByName", which refers to a function in the class to open the next dialog. That seems to be working properly.
Now I need the control class to pass a callback to a function in the main Module (not a class) to process the data, but I can't use "CallByName" since that requires an object, not a module.
I think I may need to use AddressOf, but I'm not sure if I'm doing this correctly.
Can somebody help me to pass a function as a parameter from the module to the class, and to call that function from the class. In my control class, I want a function such as:
Code:
function setCallbackFunction (moduleFunctionToProcessData){
' Set a property in the class to hold reference to function in module
}
so that I can call it, with parameters and return value:
Code:
myResult = moduleFunctionToProcessData(arg1, arg2, arg3)
Thank you.