Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Pause an Excel VBA script without freezing excel
Hello,
I wrote an application that uses a VBA object called iMacros. iMacros is a browser automation tool. My program uses iMacros to fill forms. The iMacros object launches a browser and runs its own script in the browser. While the script is running the VBA program is paused. I believe this is causing Excel to display 'Not Responding' messages. I believe I have two possible solutions to this problem: 1) If I pause the VBA program using VBA native methods, will that eliminate the freezing? the iMacros plugin has a return object that will return 'True' when the script is complete. Here is pseudocode explaining the idea: i. prepare VBA script to pause ii. play iMacros script iii. pause VBA script until iMacros object returns true iv. when iMacros object returns true continue. I'm not sure if this is possible; the iMacros object might already pause excel. I have no experience with threading; and I have no idea what threading options are available in excel. 2) The second solution is stop the program, between each run of the script, let excel respond to windows so windows doesn't give a 'Not Responding" message, and then continue. Any thoughts? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Pause an Excel VBA script without freezing excel
On Nov 9, 5:34*pm, duadinam wrote:
Hello, I wrote an application that uses a VBA object called iMacros. *iMacros is a browser automation tool. *My program uses iMacros to fill forms. The iMacros object launches a browser and runs its own script in the browser. *While the script is running the VBA program is paused. *I believe this is causing Excel to display 'Not Responding' messages. I believe I have two possible solutions to this problem: 1) *If I pause the VBA program using VBA native methods, will that eliminate the freezing? *the iMacros plugin has a return object that will return 'True' when the script is complete. *Here is pseudocode explaining the idea: i. prepare VBA script to pause ii. play iMacros script iii. pause VBA script until iMacros object returns true iv. when iMacros object returns true continue. I'm not sure if this is possible; the iMacros object might already pause excel. *I have no experience with threading; and I have no idea what threading options are available in excel. 2) The second solution is stop the program, between each run of the script, let excel respond to windows so windows doesn't give a 'Not Responding" message, and then continue. Any thoughts? Thanks Maybe you could have a 2nd macro and in the first then use IF if true then run macro 2 else continue or run macro 3 end if also explore ENABLEEVENTS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop / Pause a Macro using Pause button | Excel Programming | |||
Pause Excel Macro | Excel Discussion (Misc queries) | |||
Excel 2000/XP script to Excel97 script | Excel Programming |