MultiPage VB Problem

M

MarkHear1

Good Morning All,

I am having trouble with inputting a value from a text box into a text
box on a website.
The below code works fine as long as 'TB1' is located on the first page
of my userform with multipage set up, however if i put 'TB1' on the
second page the code does not work and the following error is shown:
"Object Variable or With block variable not set"
If any body could help me with this problem it would be greatly
appreciated.

Private Sub CommandButton1_Click()

Dim Tbox1 As Object
Set Tbox1 = TB1

Set ie = CreateObject("InternetExplorer.Application")

With ie
..Navigate "URL"
..Visible = True
Do Until .ReadyState = 4
DoEvents
Loop
End With

Set ipf = ie.Document.all.Item("v_ouc")
ipf.Value = Tbox1

End Sub

Thank you,
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top