Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general,microsoft.public.office.developer.vba
|
|||
|
|||
![]()
Dear all,
I am programming in VBA in EXCEL... Is there a way to automatically format the code when I inserted a lot of things so it's getting very messy. Which key short cut shall I use to automatically format the code? Thanks alot! |
#2
![]()
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general,microsoft.public.office.developer.vba
|
|||
|
|||
![]()
Not sure what you mean, but the MZ-Tools addin may be useful.
http://mztools.com/index.htm NickHK "cfman" wrote in message ... Dear all, I am programming in VBA in EXCEL... Is there a way to automatically format the code when I inserted a lot of things so it's getting very messy. Which key short cut shall I use to automatically format the code? Thanks alot! |
#3
![]()
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general,microsoft.public.office.developer.vba
|
|||
|
|||
![]()
The best way is to format as you create the code.
First make sure that auto indent is set (in the VBIDE, ToolsOptionsEditor), and then when you create code just use the tab key to create another level of indenting. When indenting something like a For ... Next loop, the bits inbetween For and Next will be indented (at least) one more level, so you will need to delet one tab in the Next line. The way that I do is is to code If ... Else .... Endif and For ... Next without any intervening code, then the indenting is maintained, and go back and add the rest of the code. You can also automatically indent, un-indent blocks of code by selecting all the lines and hitting Tab and Shift-Tab. If you follow good coding practices, you will never need Stephen's indenter. Whilst it is a verey useful tool, I personally have never had a use for it, and I would be willing to bet that Stephen doesn't use it either. HTH Bob "cfman" wrote in message ... Dear all, I am programming in VBA in EXCEL... Is there a way to automatically format the code when I inserted a lot of things so it's getting very messy. Which key short cut shall I use to automatically format the code? Thanks alot! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to conditional format all black after date specified in code? | Excel Discussion (Misc queries) | |||
Code Date Format Depending on Computer format | Excel Discussion (Misc queries) | |||
zip code format | Excel Discussion (Misc queries) | |||
code to convert date from TEXT format (03-02) to DATE format (200203) | Excel Programming | |||
code for converting data format in another format | Excel Programming |