I have a Project I am working on, and I need to be able to copy information to excel. I am having trouble copying the data I need.
Here is my code (Note this is a password protected site and will not allow access):
Dim IE As Object
Sub SICsearch()
Application.ScreenUpdating = False
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate "https://nola.captiveaire.com/Order/orderSearch"
Application.StatusBar = "Submitting"
' Wait while IE loading...
While IE.Busy
DoEvents
ActiveCell.Select
Selection.Copy
Wend
' **********************************************************************
delay 5
IE.document.getElementById("job-number").Value = ActiveCell.Value
delay 1
SendKeys ("{Enter}")
'****************************************************************
While IE.Busy
DoEvents
ActiveCell.Offset(0, 2).Select
Wend
delay 5
Range(A1).Value = IE.document.getElementsById("OrderHeader_JobSiteAddressSheet_LabelJobSiteAddress1").Value
End Sub
Private Sub delay(seconds As Long)
Dim endTime As Date
endTime = DateAdd("s", seconds, Now())
Do While Now() < endTime
DoEvents
Loop
End Sub
Here is the Source Code of the text I want to copy:
<span id="OrderHeader_JobSiteAddressSheet_LabelJobSiteAddress1" class="CInfoText" style="font-weight:bold;">4012 River Rd.</span>
Any help is greatly appreciated as I have been stuck for a while on this one.
Thanks!