Hello,
I have a procedure running off of a userform. Within that procedure, I am using Application.Run to call a sub in another workbook. When I step through my code, the Application.Run line to call the other sub works perfectly, the sub runs perfectly, but when my highlighted line is “End Sub” where it should transfer control back to my main procedure, it gives me Error 424: Object Required. Then, when I hit debug, the line that is highlighted as the problem is my original Application.Run line, which worked fine in the first place.
Here’s my code:
Here's the sub under the other workbook:![]()
Please Login or Register to view this content.
I’m finding this all pretty confusing…which line is the error actually on? Does it have something to do with transferring control back to the procedure written in the userform? I’ve run the program omitting calling the sub under the other workbook entirely, and everything works great.![]()
Please Login or Register to view this content.
Also: I know that in this line
the “=True” isn’t correct syntax. But VBA kept prompting me that my syntax was incorrect when I didn’t have it. It would say “Compile Error: Expected:=” and then when I just put an equals sign, it would say “Compile Error: Expected: Expression” So I just put “=True” in there to make it happy. Could that be the problem?![]()
Please Login or Register to view this content.
Bookmarks