Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Project Sheet: ln39, col2 1

Status
Not open for further replies.

WaterSprite

Technical User
Mar 23, 2004
69
0
0
US
On the toolbar of the VBA project sheet, there is a box that lists the line number and column of each individual letter of code. Is it possible to use that line number in code, as an example:

[Select Case aaaa2]
[Case VbNo]
[If aaaa2 = VbNo Then Resume ln39, col2]
 
.... then you add a few lines of comments in your code in lines 20 to 27

Then what?

Have fun.

---- Andy
 


hi,

What is aaaa2?

Also the ln/col (a feature that I quite frankly have ignored and will continue to ignore) is merely a location help feature in the editor. It has absolutely nothing to do with the code.

The better coders use a structured code technique that eliminates the use of Goto a lineNumber. Using the GoSub...Resume statement structure is probably the only departure, but the Resume implies the next statement after the GoSub.

Your code...
Code:
Select Case aaaa2
  Case VbNo
    'this will execute when aaaa2 EQUALS vbNo, no IF required!!!
End Select


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Skip, thanks for the lesson. I have used ln/col as a locate feature, just wondered if it did anything else. Now I know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top