Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

indenting of vba code 1

Status
Not open for further replies.

electricpete

Electrical
May 4, 2001
16,774
I notice that vba is good at putting colors into my code to make it more readable.

I vaguely remember that it used to indent for readability but now it doesn't anymore.

This code ends up all left justified
If 3 > 2 Then
MsgBox ([var1])
End If

Why doesn't it indent the middle line?



=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
Replies continue below

Recommended for you

In the VBA editor check Tools=>Options, and select "Editor Tab". I believe there is an "Auto Indent" checkbox on that form.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Cajun's solution will indent the next line if you have indented a line. So you'll have to indent pretty much yourself. A good - and free - automatic indenter is SmartIndent (
Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Awesome. Thanks guys.

=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor