troubleshooting Question

vb6 InternetExplorer.application auto submit click

Avatar of daypro
daypro asked on
Visual Basic Classic
6 Comments1 Solution4834 ViewsLast Modified:
I Can use vb6 code auto fill user_id,user_code ,and password in webpage of   https://eservice.chinalife.com.tw/sso/loginContent.jsp 
when I manual mouse click login button it works ok

but using 'MyIE.Document.Forms(0).submit auto submit
it shows error message like security reason ,time out

how do I using vb6 program code to auto click login,
"https://eservice.chinalife.com.tw/sso/loginContent.jsp "

thanks.
 
'-------VB6 CODE Begin
Private Sub Command1_Click()
sUrl = "https://eservice.chinalife.com.tw/sso/loginContent.jsp"
Set MyIE = CreateObject("InternetExplorer.application")
MyIE.Navigate (sUrl)

Do While MyIE.Busy And Not MyIE.ReadyState = 4
DoEvents
Loop

MyIE.Document.Forms(0).user_id.Value = "T120122924"
MyIE.Document.Forms(0).user_code.Value = "99580212"
MyIE.Document.Forms(0).Password.Value = "11111111"
'MyIE.Document.Forms(0).submit

MyIE.visible = True
End Sub

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros