I am using same Splash Screen User Form for 3 years in my company but today it started giving Method 'Wait' of object '_Application' failed
error.
I am assuming this is related to New Microsoft Share Point (previously we were using our internal share point now using cloud)
I tried to search on SO but nothing exactly same. (i.e: Method 'VBE' of object '_Application' failed)
I tried deleting the extra paranthesis but no change...
I am thinking of adding On Error
statement but if my splash screen won't pop-up why would I have this code & user form? So honestly rather than On Error
statement I want to have a real solution.
Application.Wait (Now + TimeValue("00:00:01"))
SplashUserForm.Label1.Caption = "Opening..."
SplashUserForm.Repaint
Application.Wait (Now + TimeValue("00:00:01"))
Unload SplashUserForm
Application.OnKey "{F7}", "showContains"
*An Error comes straight away when it comes to Application.Wait (Now + TimeValue("00:00:01"))
UPDATE
After reviewing Stax' suggestion as per his comment once I change the Application
object with CreateObject("Excel.Application")
this fixes the first problem which is Wait
method. But then the next line OnKey
method doesn't work with CreateObject("Excel.Application")
.