Hi,
I have a class module with various functions in it which are all quite similar. I have another function in this class which I want to act as the publicly exposed caller to these other function. It has two arguments, NameOfSub and NumberOfCalls. The idea is that the name of the sub-functions are passed in the argument to the caller function (along with the number of times to call it) and "application.run NameOfSub, NumberOfCalls" is used to call them. This seems to be failing and I think it might be because it's not a normal module? I get the error "1004 - Cannot run the macro XYZ. The macro may not be available in this workbook or all macros may be disabled". It's definitely not a trust issue or any security settings.
Is there a trick someone knows for doing this with classes?
Many thanks
I have a class module with various functions in it which are all quite similar. I have another function in this class which I want to act as the publicly exposed caller to these other function. It has two arguments, NameOfSub and NumberOfCalls. The idea is that the name of the sub-functions are passed in the argument to the caller function (along with the number of times to call it) and "application.run NameOfSub, NumberOfCalls" is used to call them. This seems to be failing and I think it might be because it's not a normal module? I get the error "1004 - Cannot run the macro XYZ. The macro may not be available in this workbook or all macros may be disabled". It's definitely not a trust issue or any security settings.
Is there a trick someone knows for doing this with classes?
Many thanks