-
Ok, as you suggested I've converted the handlers to Public Subs on the form, but I'm still not able to access them from the class. Here's an example.
CmdButton50 gets clicked on Userform1. The click is detected by classCmdButtons, who now wants desperately to tell somebody about it, but the click is handled with the form Sub named "Public Sub CmdButton50Click", and the only way the class can run the handler directly is to construct the name of the handler using concatenation, knowing the name of the clicked button and knowing that the handler is always the button name + "Click". And this is my sticking point, and the reason that I thought that Application.Run might be the way to go. Your suggestion of Form.YourPublicSub1 would work if I didn't have to construct the name of the Sub, but since I do, is there another syntax that would work here? The handler name is being constructed just fine and Application.Run is trying to run the right Sub but it just can't see into the form to find it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules