Add a reference to "Microsoft visual basic for applications extensibility..."
Sub Tester()
Dim oVBE As vbe
Dim startLine As Long, startCol As Long
Dim endLine As Long, endCol As Long
Dim sContent As String, tmp As String, l As Long
Set oVBE = Application.vbe
oVBE.ActiveCodePane.GetSelection _
startLine, startCol, endLine, endCol
For l = startLine To endLine
tmp = oVBE.ActiveCodePane.CodeModule.Lines(l, 1)
If l = endLine Then tmp = Left(tmp, endCol - 1)
If l = startLine Then tmp = Right(tmp, (Len(tmp) - startCol) + 1)
sContent = sContent & IIf(Len(sContent) > 0, Chr(10), "") & _
tmp
Next l
Debug.Print sContent
End Sub
GetSelection method: http://msdn.microsoft.com/en-us/library/aa443954(v=vs.60).aspx
See here for how to use that returned information to access the actual text: http://www.cpearson.com/excel/vbe.aspx (I'm sure it's there somewhere...)
EDIT - did that for you for my own education...
I'll put it on your tab ;-)