Hi,
I have recently found some code to dump some varables into a website from an excel sheet.
Here is the code in full.
Basically it gives an error on this line
The variable webname is the name of the text box on the webpage in question.
I have about 200 of these item names in column B.
I would like to iterate through each and assign the value.
Any help is appreciated.
Remember- It's nice to be important,
but it's important to be nice
I have recently found some code to dump some varables into a website from an excel sheet.
Here is the code in full.
Code:
Sub WebSubmit2()
Dim obIE As Object
Dim vURL As String
Dim i As Integer
Dim lastrow As Integer
Dim webname As String
lastrow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row
vURL = "[URL unfurl="true"]http://server/test/index.html"[/URL]
Set obIE = CreateObject("InternetExplorer.Application")
obIE.navigate (vURL)
While obIE.Busy = True
DoEvents
Wend
obIE.Visible = True
With obIE.Document
For i = 2 To lastrow
webname = Range("B" & i).Value
.all.Item(webname).Value = Range("E2")
.Forms(0).submit
Next i
End With
Set obIE = Nothing
Exit Sub
err_catch:
MsgBox ("Error Number " & Err.Number & ". " & Err.Description)
End Sub
Code:
.all.Item(webname).Value = Range("E2")
I have about 200 of these item names in column B.
I would like to iterate through each and assign the value.
Any help is appreciated.
Remember- It's nice to be important,
but it's important to be nice