![]() |
Continuous Loop
You can try putting a DoEvents statement in the loop. This might work
if the loop depends on an event which for some reason isn't registering when the loop is running. Just a stab in the dark (maybe one of the gurus can make a stab in the light) -John Coleman Freddy wrote: I have a working Visual Basic Module that successfully runs standalone. Now, I am trying to invoke/call it from a userform. However, it runs then loops instead of stopping. I have stepped through the code using F8 and it does not loop. It appears that things have to "slow down" for it to work. Any solutions? |
Continuous Loop
Maybe it would be helpful if you posted the userform code that calls
the macro. Freddy wrote: There is no intention to perform any loop. The task is to open a master workbook, then open other workbooks to be used as input to the master workbook, then print the master workbook, then close all open workbooks. For some unknown reason it runs the code again and again. "John Coleman" wrote: You can try putting a DoEvents statement in the loop. This might work if the loop depends on an event which for some reason isn't registering when the loop is running. Just a stab in the dark (maybe one of the gurus can make a stab in the light) -John Coleman Freddy wrote: I have a working Visual Basic Module that successfully runs standalone. Now, I am trying to invoke/call it from a userform. However, it runs then loops instead of stopping. I have stepped through the code using F8 and it does not loop. It appears that things have to "slow down" for it to work. Any solutions? |
All times are GMT +1. The time now is 12:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com