from txtBox.text to web browser field.
I have 4 text boxes and a button that opens up a web browser going to a particular site. This site has all the fields listed in the code below. The field Labeled ("Descript") is the one i am refering to. My question is how do I code so that the cmdButton when clicked opens the web browser only if the text boxes have data in them. It could only be one text box in which Case I only need the browser to open one time, or it could be 4 text boxes that have data in them in which case i needs the web browser to open 4 times. so for instance if only the txtoutbound Box has data in it then i need it to open one of the web browser and in the feild labeled "SubmitSegment.Document.All("Descript").Value = " i need it to put the information from txtOutbound. However if txtOutbound and txtMeeting have data in them then I need the webbrowser to open twice and in the field of the webbrowser that opened because of txtOutbound i need the data from txtOutbound to be placed in the "SubmitSegment.Document.All("Descript").Value = " field and then the second brower would open for the txtMeeting, inputing the data from txtMeeting in the "SubmitSegment.Document.All("Descript").Value =" field. This could happen a total of 4 times. Can I create just one webbrowesr? and how would I code it?
Code:
Private Sub SubmitSegment_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If InStr(URL, WebURL) Then
SubmitSegment.Document.All("segment_type").selectedIndex = 0
SubmitSegment.Document.All("Descript").Value = txtOutbound
SubmitSegment.Document.All("Approval").Value = "john Doe"
SubmitSegment.Document.All("Fname").Value = "John"
SubmitSegment.Document.All("Lname").Value = "Doe"
SubmitSegment.Document.All("Phone").Value = "1234567"
SubmitSegment.Document.All("Department").selectedIndex = 2
SubmitSegment.Document.All("super").selectedIndex = 0
End If
End Sub
Re: from txtBox.text to web browser field.
Please do not bump threads. For some of the reasons, see this
Re: from txtBox.text to web browser field.
I am sorry. Although this post is a little different, and the previous is marked as resolved since i thought it was. I wont do it again.
Re: from txtBox.text to web browser field.
Quote:
Originally Posted by Hack
Please do not bump threads. For some of the reasons, see
this
I asked him to put this question in a separate thread in keeping with the standard practice of the boards.
Also, since the only post he made was the OP, I don't see how it could be construed as a bump.
EDIT: Unles he bumped it and you deleted the post, in which case, never mind.
Re: from txtBox.text to web browser field.
Re: from txtBox.text to web browser field.
may be u can go like that.......
vb Code:
public sub ReviewNSubmit()
if txtoutbound > "" and txtmessage = "" then
then 'navigate to site
do until pageloaded = true and SubmitSegment.busy = false
doevents
loop
'fill the page & submit
elseif
if txtoutbound > "" and txtmessage > "" then
then 'navigate to site
do until pageloaded = true and SubmitSegment.busy = false
doevents
loop
'fill the page & submit 1st data
pageloaded1 = false
do until pageloaded1 = true and SubmitSegment.busy = false
doevents
loop
pageloaded2 = false
' open next url to fill form
do until pageloaded2 = true and SubmitSegment.busy = false
doevents
loop
' fill page n submit the second data.....
end if
end if
end sub
in general decleration's declare
vb Code:
dim pageloaded as boolean
dim pageloaded1 as boolean
dim pageloaded2 as boolean
& in browser download complete event set all those variable as true