Excel 2007 Auto Login Problem worked with 2003

P

pops69

below is the code that i have in my spreadsheet to auto log into various web
sites and d/l updated information from about 10 different sites
automatically. I do these data updates about 20 times per hour with 10 diff
sites. this code worked perfectly with excel 2003, but since installing 2007
when i run the macro, it goes to the web page at the login screen but does
not put in the account name or password.

is there any specific settings in excel 2007 that need to be changed to get
the auto logon ot work.

macro code below for each one of the sites i log into, they are all the same
other than the acct and pw it grabs from the spreadsheet to run:

Sub BetJBN()
Const BetJBN As String = "http://www.betjbn.com/"

UserName = Range("b5").Value
Password = Range("b6").Value

On Error GoTo Err_Login

Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True

With IE
.navigate BetJBN 'address of log in page
Do While .busy: DoEvents: Loopw
Do While .ReadyState <> 4: DoEvents: Loop

'this information is specific to the web page
With .document.forms(0)
.customerID.Value = UserName
.Password.Value = Password
.submit
End With
End With

Exit_Login:
Exit Sub
Err_Login:
MsgBox Err.Number & " " & Err.Description, vbOKOnly + vbCritical, "Error"
Resume Exit_Login

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top