ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   vba code format (https://www.excelbanter.com/excel-programming/396927-vba-code-format.html)

rodchar

vba code format
 
hey all,
is there a way to format vba code automatically with indents and such? (like
a shortcut key to press or something)
thanks,
rodchar

Chip Pearson

vba code format
 
For new VBA code, you should have the Auto Indent enabled. In the VBA
Editor, go to the Tools menu, choose Options then check the Auto Indent
setting. This will indent code as you type but doesn't indent existing code.
For that, you should get your hands on Stephen Bullen's Smart Indent add-in,
free to download from http://www.oaltd.co.uk/Excel/Default.htm , about half
way down the page.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)





"rodchar" wrote in message
...
hey all,
is there a way to format vba code automatically with indents and such?
(like
a shortcut key to press or something)
thanks,
rodchar



rodchar

vba code format
 
cool, thanks for the tip.
rod.

"Chip Pearson" wrote:

For new VBA code, you should have the Auto Indent enabled. In the VBA
Editor, go to the Tools menu, choose Options then check the Auto Indent
setting. This will indent code as you type but doesn't indent existing code.
For that, you should get your hands on Stephen Bullen's Smart Indent add-in,
free to download from http://www.oaltd.co.uk/Excel/Default.htm , about half
way down the page.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)





"rodchar" wrote in message
...
hey all,
is there a way to format vba code automatically with indents and such?
(like
a shortcut key to press or something)
thanks,
rodchar




All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com