Hello guys,
I'm trying to setup a timeout for a macro I'm creating, it reaches out to a file, if that file is open it times out for 10 sec and then tries again.
My initial approach was to make a do loop for x seconds, but that was an awful idea because it prevents other actions from happening.
My second approach landed me on: Application.OnTime.
After reading the documentation: https://docs.microsoft.com/en-us/office/vba/api/excel.application.ontime
I was surprised that: "Procedure[FONT="] must take no arguments and cannot be declared in a custom class or form."
Why is it so? What is the normal work around?
Calling a sub that calls a sub with arguments just [/FONT]feels incompetent.
I'm trying to setup a timeout for a macro I'm creating, it reaches out to a file, if that file is open it times out for 10 sec and then tries again.
My initial approach was to make a do loop for x seconds, but that was an awful idea because it prevents other actions from happening.
My second approach landed me on: Application.OnTime.
After reading the documentation: https://docs.microsoft.com/en-us/office/vba/api/excel.application.ontime
I was surprised that: "Procedure[FONT="] must take no arguments and cannot be declared in a custom class or form."
Why is it so? What is the normal work around?
Calling a sub that calls a sub with arguments just [/FONT]feels incompetent.