简体   繁体   中英

Excel 2007 VBA Macro Stops when userform called

I've been building a macro for a few weeks, and all of a sudden part doesn't work properly. When I try to call a userform via .Show, for some reason the marco stops running right there and then, and highlights the ".show" line. (Even if I jump to the userform box, the buttons are not functional.) If I press F5 it starts to run again, but I obviously don't want the code to stop running in the middle of the program. Any idea why this could happen, especially when it didn't used to happen?

It turns out I had a bug in my code, which was hiding because I did not remove a previous "On Error Resume Next." Many thanks to Siddharth!

It is possible that the OP's concluded answer is not connected to the question, but is coincidental.

I had the same thing. Code stopped on frm.show for aboluteamente no legitimate reason. It was as though there was a Stop there. I tried everything but the solution was, unequivocably, to reboot.

I know it's a level one answer, but it truly did fix the problem here. I'm hoping that someone will save themself googling and spitballing 100 irrelevant solution attempts when, as stupid as it is, just rebooting fixes it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM