Showing posts with label Login to google using Excel. Show all posts
Showing posts with label Login to google using Excel. Show all posts

Tuesday, September 20, 2011

Log in to google or facebook account using excel





Login to Google Account using VBA


Have you ever thought of automating your login to google account or any other account using excel macros?
Hear is the simple macro to log in to google account.

Note: Change to your user name and password.
Code: For google account
****************************************************
Sub Login_google()
    
    Dim ie As Object
    
    Set ie = CreateObject("InternetExplorer.Application")
    
    ie.navigate "https://www.google.com/accounts/Login"
    
    ie.Visible = True
    
    Do While ie.Busy And Not ie.readyState = 4
        DoEvents
    Loop
    
    DoEvents
    
    ie.document.all.Item("Email").Value = "Rajendiran"
    ie.document.all.Item("passwd").Value = "******"
    ie.document.all.Item("signIn").Click
    
End Sub

****************************************************

 Code: For Facebook account

****************************************************
Sub Login_facebook()
    
    Dim ie As Object
    
    Set ie = CreateObject("InternetExplorer.Application")
    
    ie.navigate "http://www.facebook.com/login.php"
    
    ie.Visible = True
    
    Do While ie.Busy And Not ie.readyState = 4
        DoEvents
    Loop
    
    DoEvents
    
    ie.document.all.Item("email").Value = "rajendiran@mymail.com"
    ie.document.all.Item("pass").Value = "*******"
    ie.document.all.Item("login").Click
    
End Sub

****************************************************