PDA

View Full Version : Select check box on web page



rajesh nag
06-13-2008, 09:37 AM
Hi,

Please help me

1. To add value in excel sheet to text box on from b4
2. To check a check box and clik submit in web page
which will create rquest kit
3. Find and click on text in web page which is in my excel sheet2 b4
which will shoe add viewer and add requestr text box
4. Fill value in column b5 to a add viewer text box and clikc on go it will navigate one page
5. Fill value in column A and C to 2 different text box in that page and submit
a1 c1 submit
wait unitil page reopens
a2 b2 submit
wait unitil page reopens
a3 b3 sumbit
wait unitil page reopens
and so on

I was able to open and login to web site
finding difficulties to perform above operations

Could you please help me

Regards,
Rajesh

Simon Lloyd
06-13-2008, 12:09 PM
Rajesh, you have 36 posts so are not a newcomer to this forum, so you know you should not post duplicate posts in order to get your question answered quicker - please do not do this again!

rajesh nag
06-14-2008, 10:21 AM
Hi

Duplicate post happened beacase I did not see my post in my threads

So i thought the process was incomplete from my side so i raised the other one

Appologise for duplicate request.

Regards,
rajesh

rajesh nag
06-19-2008, 11:35 AM
Hi finaly i was successful in creating macros as per requirements only problem for me is

ieForm(16).Value = Sheet1.Range("A4").Text
ieForm(18).Value = Sheet1.Range("c4").Text
ieForm(37).Value = Sheet1.Range("A4").Text
ieForm(44).Click

once the submit happens i want to run the bellow macros multiple times
Untill the row end with null value

in the next run it should be a5,c5 so on untill the whole row become null

I am trying like this but it is not working for me can any help me out in this

-----------------------------------------------------------------------
Private Sub CommandButton2_Click()
Dim strRegionName As String, strrequestsite As String
strRegionName = Sheet2.Range("A11").Text
strrequestsite = Sheet2.Range("A10").Text
Call CreateRqnm(strRegionName, strrequestsite)
End Sub

Sub CreateRqnm(MyRegionName As String, requestsite As String)
Dim ie As Object, oDoc As Object
Dim ieForm As Variant
Dim webpage As String
Dim i As Integer
Dim intRowCount As Intege

Set ie = CreateObject("InternetExplorer.Application")
webpage = Sheet2.Range("b11").Text
ie.Visible = True
ie.navigate webpage

Do Until ie.ReadyState = 4 'READYSTATE_COMPLETE
Loop
Set oDoc = ie.Document
Set ieForm = oDoc.forms(0)

ieForm(6).Value = Sheet2.Range("A11").Text
ieForm(8).Value = Sheet2.Range("A12").Text
ie.Document.forms(0).Submit


Set ie = CreateObject("InternetExplorer.Application")
webpage = Sheet2.Range("B11").Text
ie.Visible = True
ie.navigate webpage

intRowCount = Range("A4").CurrentRegion.Rows.Count
For i = 1 To intRowCount
Do Until ie.ReadyState = 4 'READYSTATE_COMPLETE
Loop
Set oDoc = ie.Document
Set ieForm = oDoc.forms(0)

intRowCount = Range("A4").CurrentRegion.Rows.Count
For i = 1 To intRowCount

ieForm(16).Value = Sheet1.Range("A4").Text
ieForm(18).Value = Sheet1.Range("c4").Text
ieForm(37).Value = Sheet1.Range("A4").Text
ieForm(44).Click
ActiveCell.Offset(1, 0).Select
Next i

End Sub
-----------------------------------------------------------------------

Simon Lloyd
06-19-2008, 11:43 AM
Rajesh please wrap your code in code tags edit your post highlight the code and press the green vba button!

stanl
06-19-2008, 11:48 AM
One thing I noticed is you are opening multiple instances of IE w/out a

ie.quit
Set ie= Nothing

which would assume you want to open/submit a form multiple times with different values.

[me] Not knowing what happens after the click event... it may be possible to open a single instance of ie, enter values then either issue ie.refresh() or back... Just .02 Stan