• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Fixing indentation in vba module

shahin

Active Member
Hi there! Is there any built-in stuff in vba to fix the indentation other than any add-in, as in Rubberduck? Without the proper indentation, most of the time what I write looks horrible. Thanks for any answer.
 
Thanks YasserKhalil, for your suggestion. Actually, I'm also using some add-in at this moment. It seems to me that this add-in makes my program a little slower. However, I wanted to know whether there is any built-in feature in vba which I'm not aware of can do the thing.
 
Hi ,

Are you aware of this ?

VBE Option – Auto Indent
VBE (Visual Basic Editor) has an option called Auto Indent, but it does not automatically indent all lines of code. Auto Indent functions when you press Enter key to start a new line, if the code before you press Enter has indentation, the new line will begin at the position of the previous indentation. If you don’t turn on the Auto Indent function, the next line will start on the left.

In VBE, navigate to Tools > Options >Editor Tab

Check the box Auto Indent to enable the option, you can also specify Tab width, the default value is 4, you can leave it as is.



Narayan
 
This is the thing I was after. You always come up with something new. Thanks Narayan for showing me how.
 
Back
Top