It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

VB6 problem sending data to web table cell.

Moderator: dafunkymunky

VB6 problem sending data to web table cell.

Postby ArferMo on Tue Sep 23, 2008 12:55 pm

I'm having problems with VB6 sending data to a web table drop down box.

I am using VB6 not .net and the web page is not mine so I am unable to change that. I need to use the InternetExplorer object as the user will already have that open and be logged in to the required site.

I have loaded the web form to a public area for testing.

The problem is that the work type field is blank after VB has done its work prior to posting the page.

VB6 code:-

Private Sub Command1_Click()
Set objIE = New InternetExplorer
objIE.Visible = True

objIE.Navigate2 "http://arthurbard.com/MyTestArea/OT_New.htm"

DoEvents
Do While objIE.Busy
DoEvents
Loop

While objIE.readyState <> 4
DoEvents
Wend

DoEvents

objIE.document.All("Hours").Value = "03"
objIE.document.All("Type").Value = "CPO"
objIE.document.All("Job_no").Value = "Testing"
objIE.document.All("Remarks").Value = "This is a test record please ignore."
MsgBox "Now why is the work type cell blank and not showing CPO."
End Sub


I hope someone is able to solve this problem.
ArferMo
 
Posts: 2
Joined: Tue Sep 23, 2008 10:52 am

Postby ArferMo on Wed Sep 24, 2008 2:51 pm

I know that the problem is caused by an html coding problem on the page but I am unable to get that corrected.

But if you can manually click on the drop down arrow in the "Work Type" box to drop the menu down then click on the "CPO" option.... then why can't you do it withing the VB6 code.

FAULTY LINE
<option>CPO</option>


CORRECTED LINE
<option value ="CPO">CPO</option>

But how to do it in VB6 on the page with the html error.
ArferMo
 
Posts: 2
Joined: Tue Sep 23, 2008 10:52 am


Who is online

Users browsing this forum: No registered users and 6 guests