Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default get the line at cursor number in the module

Tom,

Use code like

Dim StartLine As Long
Dim EndLine As Long
Dim StartCol As Long
Dim EndCol As Long

Application.VBE.ActiveCodePane.GetSelection _
StartLine, StartCol, EndLine, EndCol


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"tom taol" wrote in message
...


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 ***



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forcing the cursor to move to A of the next line after D of the pr Kitti Excel Discussion (Misc queries) 4 June 16th 07 04:42 PM
Go to line in Module RB Smissaert Excel Programming 3 February 14th 05 08:28 PM
Get Module line # for error trapping Geof Wyght[_2_] Excel Programming 5 October 7th 04 01:21 PM
On Error, Capturing current module and actual line of code Paul Martin Excel Programming 4 June 13th 04 06:21 AM
Strange Module line JonWayn Excel Programming 2 November 25th 03 06:02 PM


All times are GMT +1. The time now is 05:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"