Hello,
I'm trying to fill in fields on a website with excel and am having some issues. Ideally I would like to have the value taken from Cell(1,1). I have been able to automate the login process but that pages code is far more simple. I'm able to get to the page where information needs to be filled in. Love any ideas.
the code I'm using is this:
Private Sub IE_Autiomation()
Dim i As Long
Dim IE As Object
Dim objElement As Object
Dim objCollection As Object
' Create InternetExplorer Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
' Send the form data To URL As POST binary request
IE.Navigate "https://compliancelink.xxxxxxxxxxxxxx"
' Statusbar
Application.StatusBar = "Loading. Please wait..."
Application.StatusBar = "Search form submission. Please wait..."
Set objCollection = IE.document.getElementsByID("input")
IE.document.getElementById("thisCustData[0]").Value = "1"
Set IE = Nothing
Set objElement = Nothing
Set objCollection = Nothing
Application.StatusBar = ""
End Sub
The html provided from the site is:
- <td class="formLabel">
-Reference Number :
-<input type="hidden" name="thisCustData[0].fieldName" value="Reference Number">
-</td>
-<td class="formField">
- <input type="text" name="thisCustData[0].fieldValue" maxlength="50" size="50" value="">
I'm trying to fill in fields on a website with excel and am having some issues. Ideally I would like to have the value taken from Cell(1,1). I have been able to automate the login process but that pages code is far more simple. I'm able to get to the page where information needs to be filled in. Love any ideas.
the code I'm using is this:
Private Sub IE_Autiomation()
Dim i As Long
Dim IE As Object
Dim objElement As Object
Dim objCollection As Object
' Create InternetExplorer Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
' Send the form data To URL As POST binary request
IE.Navigate "https://compliancelink.xxxxxxxxxxxxxx"
' Statusbar
Application.StatusBar = "Loading. Please wait..."
Application.StatusBar = "Search form submission. Please wait..."
Set objCollection = IE.document.getElementsByID("input")
IE.document.getElementById("thisCustData[0]").Value = "1"
Set IE = Nothing
Set objElement = Nothing
Set objCollection = Nothing
Application.StatusBar = ""
End Sub
The html provided from the site is:
- <td class="formLabel">
-Reference Number :
-<input type="hidden" name="thisCustData[0].fieldName" value="Reference Number">
-</td>
-<td class="formField">
- <input type="text" name="thisCustData[0].fieldValue" maxlength="50" size="50" value="">
Last edited: