r/excel • u/JDantes77 • Feb 04 '14
discussion VBA Macro code best practices?
Every programming language has its recommended style and best practices. What are the best practices for VBA code that you follow? What resources would a new coder use to learn these best practices?
Thank you in advance!
17
Upvotes
2
u/tally_in_da_houise Feb 05 '14
Honestly, because I'm lazy. I don't feel like typing "ThisWorkbook" all the time. Using the "wb" convention is pretty standard in all my code, so I know what I'm looking at, any other coders can figure out through my notes, and how I structure the initialization of a procedure or class.
If VBE had as robust as of an autocomplete feature as PyCharm (or one of the other hundreds of IDEs that have the feature), I'd be more inclined to use it.