Workbook download : https://www.amazon.com/clouddrive/sh...YjMEtAtZJAQCTi
This will give you a start to build on.
Part of the code :
Option Explicit
Sub GmailLogIn()
'Sample usage of WebsiteLogIn macro for logging-in to Gmail.
WebsiteLogIn "https://accounts.google.com/ServiceLogin?service=mail&continue=https://mail.google.com/mail", _
"Email", Sheets("Log-In").Range("C6").Value, _
"Passwd", Sheets("Log-In").Range("C8").Value, "signIn"
End Sub
Sub YahooMailLogIn()
'Sample usage of WebsiteLogIn macro for logging-in to Yahoo email.
'Just compare the element IDs of the username and password text boxes, as well as
'the element ID of the sign-in button with the correspoinding values for the Gmail case.
WebsiteLogIn "https://login.yahoo.com/?.src=ym&done=https%3a//mail.yahoo.com", _
"login-username", Sheets("Log-In").Range("C13").Value, _
"login-passwd", Sheets("Log-In").Range("C15").Value, "login-signin"
End Sub
Sub OtherLogIn()
'Sample usage of WebsiteLogIn macro for logging-in to any page, as long as the necessary
'parameters have been specified (in the Log-In sheet we use Facebook as an example).
With Sheets("Log-In")
If .Range("G20").Value = False Then
MsgBox "Sorry, but the URL you entered doesn't exist!", vbCritical, "Invalid URL Error"
Exit Sub
End If
WebsiteLogIn .Range("C20").Value, .Range("C22").Value, .Range("C24").Value, _
.Range("C26").Value, .Range("C28").Value, .Range("C30").Value
End With
End Sub
Sub ClearAllInfo()
'Just clears all the entered data from the worksheet.
With Sheets("Log-In")
.Range("C6:E30").ClearContents
.Range("C6").Select
End With
End Sub