Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Interrupting initializing stage
I have a software that I am opening through Excel VBA, it inputs the
username, password and IP address and logs in to that software. If I supply correct password, the macro works, it opens the software, supplies username, password and IP and logs in but if I supply incorrect password, it goes in an endless loop. When I open the software physically (without the macro) and supply incorrect password, it gives me a box <<INITIALIZING and does not come out of it for a very long time, I have to end task it to get rid of it. My question, can we tell excel vba programatically before the the initializing line starts that if initializing takes more than 60 seconds, then inturrupt that stage and go forward. I tried on error resume next but it does not work as it does not gives any error. Any ideas??? Code:
Sub try() Dim App As Object Dim Conn As Object Dim Srv As Object Set App = CreateObject("MySoftware.Application") Set Conn = CreateObject("MyConnection..Connection") Set Srv = CreateObject(""MyServer.Server") If App.CreateServer("username", "", "", "my IP Address", False, "ENU", Srv, Conn) Then If Conn.Login("username", "password", "my IP Address", "ENU") Then 'This is the initializing line MsgBox "Logged in" Else MsgBox "Unable to login" End If End If Set App = Nothing Set Conn = Nothing Set Srv = Nothing End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Beta stage management - help | Links and Linking in Excel | |||
Projects and Stage Chart | Charts and Charting in Excel | |||
TV-Scripts, Movie, Stage, and Novel Templates | Excel Discussion (Misc queries) | |||
Interrupting a Loop | Excel Programming | |||
Interrupting an add line | Excel Programming |