Hi,

i have this code works for some websites but when the sites log in credentials have no ID for username and password will not work.

i will live the code and source of website for the log in info.

Sub Allstream()Dim IE As Object
  Dim HTMLDoc As Object
  Dim objCollection As Object
    
    On Error GoTo Err_Clear
  Const navOpenInNewTab = &H800
  Set IE = CreateObject("InternetExplorer.Application")
  IE.Visible = True
  IE.navigate "https://360.allstream.com/login"


  Do While IE.Busy Or IE.readyState <> 4: Loop


  Set HTMLDoc = IE.document
  With HTMLDoc
  HTMLDoc.getElementById("username").Value = Worksheets("Portal_Access").Range("F3")
  HTMLDoc.getElementById("password").Value = Worksheets("Portal_Access").Range("G3")
  End With




  Set objCollection = IE.document.getElementByClassname("button-primary button-lg blockbtnLogin").Index(0)
  objCollection.Click
  
  
Err_Clear:
If Err <> 0 Then
Err.Clear
End If
Resume Next
End Sub

Source:

<input class="input-material ng-pristine ng-empty ng-invalid ng-invalid-required ng-touched" type="text" value="" name="username" ng-model="formFields.username" ng-change="setValid()" required="" translate-attr="{ 'aria-label': 'EMAIL' }" aria-label="Email" aria-invalid="true" style="">

thanks