VB6 problem sending data to web table cell.


A

keyboard_arrow_up
0
keyboard_arrow_down


First Post ArferMo
Posts: 2 - Registered: 2008-09-23 05:52:32

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.



1 Replies


A

keyboard_arrow_up
0
keyboard_arrow_down


Reply #1 ArferMo
Posts: 2 - Registered: 2008-09-23 05:52:32

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.






JOIN DEVPPL

It looks like you are new here. If you want to get involved, click on Join below!




MENU
Advertising