This is what I found but I don't know how to "login" using this code. Also there is a script error that appears when it runs, is there a way to suppress this error?
Public Sub WebQuery()
Dim cnt As Long
Dim waitTime As Long
alertTime = Now + TimeValue("00:02:00")
Application.OnTime alertTime, "WebQuery"
Const READYSTATE_COMPLETE As Long = 4
Dim x As Integer
URL = "https://www.pucatrade.com/sendCards.html"
Set ie = Sheet2.WebBrowser1
ie.Visible = 1
DoEvents
ie.navigate URL
Do Until ie.readyState = READYSTATE_COMPLETE
DoEvents
Loop
Application.DisplayAlerts = False
Do Until ie.readyState = READYSTATE_COMPLETE
DoEvents
Loop
Application.Wait Now + TimeValue("00:00:03")
HTMLdata = Sheet2.WebBrowser1.document.DocumentElement.innerText
HTMLdata = VBA.Split(HTMLdata, Chr(13)) 'change the split as required CHR(13) is for carriage return.
For x = 0 To UBound(HTMLdata)
Sheet1.Range("A" & (x + 1)) = HTMLdata(x)
Next x
End Sub
Bookmarks