Indent label

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

This has got to be about the least important question ever asked, but here
goes.

Is there a way to indent labels? I indent sections of code within procedures
to make it easier to follow the logic, like this, where I can easily spot the
If...Then loops, etc:

Private Sub DoSomething()
'Do first thing
If abc = 1 Then
If xyz = 1 Then
Docmd.DoOneThing
GoTo GoHere
Else
Docmd.DoSomeOtherStuff
End If
Else
Docmd.DoSomethingElse
End If
'Do next thing
Exit Sub
'post-processing
GoHere: 'this line should be indented
Docmd.Whatever
Docmd.Whatever2

Labels are apparently always left-justified, so there is no way I can see to
get them indented to help keep them logically grouped.
 
This is obviously just my opinion, but I want labels all the way to the left
so that they stand out. I don't want to have to search through code to find a
label, I want to be able to see it right off in my way thinking. I never
realized Access did that, because I never tried to indent mine anyway. No
idea if you can indent them. It may look ugly, but to me it serves the
purpose I described.
 
I am fairly confident that is the very reason why they auto-justify left, and
it does make perfect sense; however, I prefer to indent all related code so
that I can easily spot loops and major sections of code within procedures
when programming & debugging. Left-justified labels just make it a little
harder to follow the logic when the context of a label is limited to a small
portion of a procedure.

Like I said, probably the least important question ever asked, if not, in
fact, the dumbest, but I just had to try.
 
Back
Top