View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Greg Wilson Greg Wilson is offline
external usenet poster
 
Posts: 747
Default get the line at cursor number in the module

Sub GetCursorLine()
Dim a As Long, b As Long, c As Long, d As Long
Application.VBE.ActiveCodePane.GetSelection a, b, c, d
MsgBox a
End Sub

Regards,
Greg

"tom taol" wrote:



in excel programing, i want to get current line number which be cursor
in VBE.

MsgBox Application.VBE.ActiveCodePane.CodeModule.CountOfL ines

this is not. i don't know.

*** Sent via Developersdex http://www.developersdex.com ***