i found vba code that automatically opens a new session of IE explorer, navigates to a specific website and then logs in. it only seems to work when i test it in the vba editor.
it is currently assigend to a shape however it doesnt keep the IE session active and ends up pasting the login information to the spreadsheet. any help to fix is appreciated.
it is currently assigend to a shape however it doesnt keep the IE session active and ends up pasting the login information to the spreadsheet. any help to fix is appreciated.
Code:
Sub internetlogon()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IeHandle = IE.Hwnd
'Go to this Web Page!
IE.Navigate "connectmeeting.att.com"
'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 "8665282256", True
SendKeys "{TAB}", True
Application.Wait (Now + TimeValue("0:00:01"))
SendKeys "5972046", True
SendKeys "{TAB}", True
SendKeys "mrustemov@cltairport.com", True
SendKeys "{TAB}", True
SendKeys "Mirza", True
SendKeys "{TAB}", True
SendKeys "Rustemov", True
Application.Wait (Now + TimeValue("0:00:01"))
SendKeys "{TAB}", True
SendKeys "{ENTER}", True
Application.Wait (Now + TimeValue("0:00:01"))
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{TAB}", True
SendKeys "{ENTER}", True
Application.Wait (Now + TimeValue("0:00:01"))
SendKeys "2079", True
SendKeys "{ENTER}", True
End Sub
[code]