Change to Chrome browser

josros60

Well-known Member
Joined
Jun 27, 2010
Messages
786
Office Version
  1. 365
Hi,

how can i modify the code below to use Chrome instead of Internet explorere:

Code:
Sub IE_login()    Dim ie As InternetExplorer
    Dim C
    Dim ULogin As Boolean, ieForm
    Dim MyPass As String, MyLogin As String
     
redo:
    MyLogin = Application.InputBox("Please enter your TNW login", "TNW username", Default:="6833-9390", Type:=2)
    MyPass = Application.InputBox("Please enter your TNW password", "TNW Password", Default:="changeme", Type:=2)
     
    If MyLogin = "" Or MyPass = "" Then GoTo redo
     
    Set ie = New InternetExplorer
    ie.Visible = True
    ie.Navigate "https://secure.shawbusinesssolutions.ca/html/billing_system_login.jsp"
     
     'Loop until ie page is fully loaded
    Do Until ie.ReadyState = READYSTATE_COMPLETE
    Loop
     
     'Look for password Form by finding test "Password"
    For Each ieForm In ie.Document.forms
        If InStr(ieForm.innerText, "Password") <> 0 Then
            ULogin = True
             'enter details
            ieForm(0).Value = MyLogin
            ieForm(2).Value = MyPass
             'login
            ieForm.submit
            Exit For
        Else
        End If
    Next
    If ULogin = False Then MsgBox "User is aleady logged in"
    Set ie = Nothing
End Sub

thank you
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,223,910
Messages
6,175,316
Members
452,634
Latest member
cpostell

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