Sub myWebOpenPW()
'Open site if it requires a PassWord Model!
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
'Go to this Web Page!
IE.Navigate "http://YourLoggOnPageAddress_GosHere"
'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"))
'MsgBox "Done"
IE.Visible = True
'Send logg-on information!
'May need additional SendKeys as needed?
'Determine by the actual key-stroks needed!
SendKeys "UserID_GosHere", True
SendKeys "{TAB}", True
SendKeys "PassWord_GosHere", True
SendKeys "{ENTER}", True
End Sub
Is there a way to get this to work on lets say you are on an active sheet
in cell A1 you have
Enter User Name:
in cell A2 you have
Enter Password:
in B1 you enter your Username
in B2 you enter your password
When you click a button that is tied to the code above it would put the values from B1 and B2 in the code...
eg.
'Send logg-on information!
'May need additional SendKeys as needed?
'Determine by the actual key-stroks needed!
SendKeys "UserID_GosHere", True <<<<<<<<<<<< B1 in place of "UserID_GosHere"
SendKeys "{TAB}", True
SendKeys "PassWord_GosHere", True <<<<<<<<<<< B2 in place of "PassWord_GosHere"
SendKeys "{ENTER}", True
End Sub
Once the Webmail page opens up automatically attach the Activesheet Clearing B1 & B2
and automatically put 2 recipients of the email in the TO section of the webmail app.
Lastly when you are done sending the Webmail save the active sheet with the current day and time in say C:\timesheets when you Close the Workbook automatically save on Exiting the Workbook.
The Subject should have something to the effect of
Timesheet email for (todays date which I believe would be =Now), for the week of (The first sunday of the current week).
Thank you so much.
Bookmarks