If you’ve ever opened a VBA code file with a text editor, you’ve probably noticed the “attribute” statements at the start of the file. Even though you cannot modify these in the VBA editor, they allow you to add some spice to your VBA code.
Things you can do with the attributes are;
- Document your code, to browse it with the object browser
- Add ‘Default’ properties to classes
- Add help-context to your code
Export your code file and open it with a text editor to make the attribute statement visible. After modifying them, import them back into your project.
A good description of the attributes is hard to find, but here’s one that covers them all; VBA attribute description. Detailed instructions on how to work with the attributes can be found on Chip Pearsons excellent Excel site.
[ad name=”468×60 Banner”]