Just tried this code and it did not work
Option Explicit
Sub tweetusing_VBA()
' tools refrence select microsoft internet control
Dim ie As Object
Dim linkCollection, link
Set ie = CreateObject("InternetExplorer.application")
' open website
ie.Visible = True
ie.navigate "https://mobile.twitter.com/compose/tweet"
Do Until ie.readyState = 4
DoEvents
Loop
' login
Set linkCollection = ie.document.getElementsByTagName("input")
' check if user is already login if not then pass user id and password
For Each link In linkCollection
If UCase(link.Name) = UCase("username") Then
ie.document.getElementById("username").Value = Sheet1.user_name
ie.document.getElementById("password").Value = Sheet1.pass_word
ie.document.getElementById("commit").Click
Exit For
End If
Next
Do Until ie.readyState = 4
DoEvents
Loop
Application.Wait (Now + TimeValue("0:00:3"))
Set linkCollection = ie.document.getElementsByTagName("div")
' check if user is already login if not then pass user id and password
For Each link In linkCollection
If UCase(Left(link.innerText, 27)) = UCase("Typing on your phone stinks") Then
MsgBox "Check ID and Password"
ie.Quit
Exit Sub
End If
Next
' post tweeet
If Len(Sheet1.mess_age) > 140 Then
ie.document.getElementById("tweet[text]").Value = Left(Sheet1.mess_age, 140)
Else
ie.document.getElementById("tweet[text]").Value = Sheet1.mess_age
End If
Do Until ie.readyState = 4
DoEvents
Loop
Application.Wait (Now + TimeValue("0:00:3"))
ie.document.getElementById("commit").Click
Application.Wait (Now + TimeValue("0:00:3"))
Do Until ie.readyState = 4
DoEvents
Loop
ie.navigate "https://mobile.twitter.com/"
Do Until ie.readyState = 4
DoEvents
Loop
Application.Wait (Now + TimeValue("0:00:3"))
ie.document.getElementById("commit").Click
Do Until ie.readyState = 4
DoEvents
Loop
ie.Quit
Sheet1.pass_word.Value = ""
Sheet1.mess_age.Value = ""
MsgBox "Tweet Sent"
End Sub