login in code help

jaaakez99

New Member
Joined
Mar 31, 2010
Messages
26
Does anyone know how to adjust the below code to work on this website https://www.customerconnectionweb.com/accountAccess/login.module? I am not a code person, and have not had much success with this so any help is much appreciated.

Sub IE_login()
Dim ie As InternetExplorer, ieForm As Object
Dim MyPass As String, MyLogin As String
Do
MyLogin = Application.InputBox("Please enter your VBAX login", _
"VBAX username", Default:="login", type:=2)
MyPass = Application.InputBox("Please enter your VBAX password", _
"VBAX Password", Default:="Password", type:=2)
Loop Until Len(MyLogin) > 0 And Len(MyPass) > 0
Set ie = New InternetExplorer
ie.Visible = True
ie.Navigate "http://www1.mscdirect.com/cgi/nnsrhm"
'Loop until ie page is fully loaded
Do Until ie.readyState = READYSTATE_COMPLETE
DoEvents
Loop

On Error Resume Next
'I'm guessing the form wont be there if already logged in
Set ieForm = ie.Document.Forms("f")
On Error Goto 0
If ieForm Is Nothing Then
MsgBox "User is aleady logged in"
Else
ieForm.Item("SIUSER").Value = MyLogin
ieForm.Item("SIPASS").Value = MyPass
ieForm.Submit
End If
Set ie = Nothing
End Sub
 
Change the Navigate line for a start, and look at the HTML source of the web page to determine the name or id of the form and the login fields.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top