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