Microsoft Excel training videos
 

Twitter is a free social messaging utility for staying connected in real-time.

Now we have created a twitter client as shown in the training video below which can help you send messages to your twitter account directly from Excel. Open a new worksheet. Name one cell as 'tusername' or 'twitterusername'. Name another Excel worksheet cell below it as 'tpassword' or 'twitterpassword'. The data that you enter in the Excel spreadsheet in these cells should be your true 'user name' and 'password' that you use for twitter. Later on you can change the text colour to white so that others cannot view your password! Now click on the 'Developer' tab in the Excel 2007 ribbon, select 'insert' and finally select a button control. Then drag and draw a button control under the other cells and edit the text on the button to 'tweetThis' or 'send' or whatever you like. Right click on the button, select 'assign macro...'and write the following code in the Visaual Basic editor that opens up after you select 'New':

Sub tweetThis()

Dim xml, tUsername, tPassword, tStatus, tResult
Set xml = CreateObject("MSXML2.XMLHTTP")

'get the username entered by you in named range tusername
tUsername = Range("tusername")
'get the password entered by you in named range tpasswd
tPassword = Range("tpassword")
'get the message entered by you in named range tmessage
tStatus = Range("tmessage")

xml.Open "POST", "http://" & tUsername & ":" & tPassword & "@twitter.com/statuses/update.xml?status=" & tStatus, False
xml.setRequestHeader "Content-Type", "content=text/html; charset=iso-8859-1"
xml.Send

tResult = xml.responsetext 'you can view Twitter’s response in debug window
Debug.Print tResult

Set xml = Nothing
End Sub

The bold portion of the Excel macro depicts the connection to the twitter API. Save the file with macro. Now when you write your message and click on the button your message is transferred to Twitter.

In short, using named ranges, a button form control and a macro that connects to the twitter API , you can post messages on twitter directly from your desktop! Remember the messages cannot be more than 140 characters.


 
Create a twitter client in Excel