Basically, I would like to auto login a website, i could find the id= "username" so i could use IE.Document.getElementById("username").value = "xxxxxxx" However, it does not work since there is no value input on Dom. Instead, when i try to edit on HTML DOM by creating new attribute - Value = "xxxxxxx", it shows the username input on website. I wonder if i could transfer this into vba and finish the auto login. Thanks a lot! Error 91 shown regarding to this case
Sub Nomuralogin()
Dim IE As InternetExplorer
Dim Stockcode As String
Dim Stocktext As String, Textchange As String
Dim HTMLDoc As MSHTML.HTMLDocument
Dim IEField As HTMLInputElement
Dim i As Integer, nAsset As Integer
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "https://www.nomuranow.com/portal/site/nnextranet/en/#curtain- login"
IE.Visible = True
Do While IE.Busy Or IE.ReadyState <> READYSTATE_COMPLETE
DoEvents
Loop
Set HTMLDoc = IE.Document
Set IEField = HTMLDoc.getElementById("username")
IEField.Value = "abc@gmail.com"
'HTMLDoc.all.item("username").value = "abc@gmail.com"
Application.Wait Now + TimeValue("00:00:03")
Application.DisplayAlerts = False
IE.Quit
Set IE = Nothing
End Sub
Pic 1 shows there is no Value input:

Pic 2 shows I have created property and added a value input:
