Takamine334
asked on
WebBrowser Document Help
If I say:
wb.document.all("somevalue here").val ue = "asdf"
then the textbox called "somevaluehere" gets the value "asdf" written to it.
Why doesn't this work?
wb.document.all("somevalue
then the textbox called "somevaluehere" gets the value "asdf" written to it.
Why doesn't this work?
Private Sub Whatever()
'the below variable is getting a list of values
'from an HTML page
Dim varSomething() as string
wb.document.all(varSomething(0)).value = "asdf"
End Sub
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
?
yes ie
ReDim Preserve varSomething(0)
ReDim Preserve varSomething(1)
ReDim Preserve varSomething(2)
or if you know how many variable to store i.e. 10
you can
ReDim Preserve varSomething(9) '0-9
ReDim Preserve varSomething(0)
ReDim Preserve varSomething(1)
ReDim Preserve varSomething(2)
or if you know how many variable to store i.e. 10
you can
ReDim Preserve varSomething(9) '0-9
ASKER
It's much better to use this method:
Public wbDoc As HTMLDocument
Set wbDoc = wb.Document
wbDoc.all(varSomething(x)) .value = "asdf"
Public wbDoc As HTMLDocument
Set wbDoc = wb.Document
wbDoc.all(varSomething(x))
ASKER