BrazenMore
New Member
- Joined
- Apr 14, 2010
- Messages
- 9
Hi
I have the following code which opens a webpage and goes to the username & password fields and logons. However for so strange reason sometimes when the sendkeys sends the username or password it types on the screen incorrectly i.e. the username is brazenmore and sometimes this appears as bbrazenmore or bbrazzzenmore. The code works some of the time any ideas why this happens?
Sub internetlogon()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
'Go to this Web Page!
IE.Navigate "enter web page here"
'Check for good connection to web page loop!
Do
If IE.ReadyState = 4 Then
IE.Visible = False
Exit Do
Else
DoEvents
End If
Loop
'Wait for window to open!
Application.Wait (Now + TimeValue("0:00:01"))
IE.Visible = True
'Send logon information
SendKeys "brazenmore", True
SendKeys "{TAB}", True
SendKeys "brazenmore", True
I have the following code which opens a webpage and goes to the username & password fields and logons. However for so strange reason sometimes when the sendkeys sends the username or password it types on the screen incorrectly i.e. the username is brazenmore and sometimes this appears as bbrazenmore or bbrazzzenmore. The code works some of the time any ideas why this happens?
Sub internetlogon()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
'Go to this Web Page!
IE.Navigate "enter web page here"
'Check for good connection to web page loop!
Do
If IE.ReadyState = 4 Then
IE.Visible = False
Exit Do
Else
DoEvents
End If
Loop
'Wait for window to open!
Application.Wait (Now + TimeValue("0:00:01"))
IE.Visible = True
'Send logon information
SendKeys "brazenmore", True
SendKeys "{TAB}", True
SendKeys "brazenmore", True