I've a macro which opens a page and highlights the search box. I want to stop the macro, if the user doesnt give input within 10 sec. How can I accomplish this? Thanks.
How to stop a macro from running?
- Ace.McCloud
- Thread is marked as Resolved.
-
-
-
Depends on what you mean by page and search box I guess. Maybe: Application.OnTime()
-
Depends on what you mean by page and search box I guess. Maybe: Application.OnTime()
By page, I mean a web page and the search box where the user has to enter some data.
-
I guess you know the Internet Explorer (IE) Object model since you probably used it to open the site and set the focus. As such, I would use Timer(). A loop would execute until Timer-StartTime>=10. Or, use the Application.OnTime method and then check the Element's value or current site's URL to match to the first one.
The easier thing might be to do it in a Userform or such and then do the IE thing.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!