PDA

View Full Version : End Loop after submitBtnClick



omnibuster
07-26-2009, 07:43 AM
With Vba I open some website, login (UName+Pw).
After clicking SubmitBtn in Website i need that Loop ended.

I was using this:

Do
intResponse = MsgBox("A you done?", _
vbYesNo + vbQuestion + vbSystemModal)

If intResponse = vbYes Then
GoTo 10
Else
End If
Loop
10



But MsgBox is behind the Website i.e. not realy visible.


Sub Going_Postal()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
With IE
.navigate "http:xxxxxx"
Do While .Busy: DoEvents: Loop
Do While .readyState <> 4: DoEvents: Loop
IE.Visible = True
Do
With .document.forms(1)
' .submit ' Works OK with this VBa command
End Loop when submit clicked manually???
End With
Loop

Do While .Busy: DoEvents: Loop
Do While .readyState <> 4: DoEvents: Loop

End With

' Do something...

IE.Quit: Set IE = Nothing
End Sub

joms
07-26-2009, 10:04 PM
With Vba I open some website, login (UName+Pw).
After clicking SubmitBtn in Website i need that Loop ended.

is the website you're talking about you created by yourself or it is a third party site? if it is a third party site i don't think that would be possible.. but if you created the site then maybe you can put in the code on that 'SubmitBtn' and pass the arguments back to your vba..hmmm..just an idea..maybe some expert around here got a better idea to achieve what you're trying to do :)

omnibuster
07-28-2009, 11:10 AM
No.This is not my website.

I think: SubmitButtonClick is same as EnterClick or MouseClick on the SubmitButton.
So: If "Enter" Clicked or MouseClick used (clickevent) then End Loop.

omnibuster
08-07-2009, 07:16 AM
Thanks for looking here, but still need HELP.
How end Do...Loop process with User EnterClick.

Do

Loop Until Enter.Clicked