Make macros easier to read Cover

Share with the world

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp
Share on reddit

Make a donation

You may also like...

Make macros easier to read

Keeping your code clean, with lots of comments, no unnecessary code makes it much easier to organize and understand what’s in it, it even make it easy to see any specific snippets you want to change.

For a Portuguese version of this post, click here.

But if you are already familiar with using macros in Excel, this should not be new to you, you may have learned this by trial and error.

But there is one other trick you can do that helps a lot in reading the code, besides making your eyes less tired with that all-white screen. What you can do is change the color scheme of the VBA editor to make it easier to look at.

Before proceeding keep in mind that Excel does not have a ‘Restore Default’ button for these changes which we will see below, so if you want to return to the previous settings you will have to do this manually.

Changing VBA code color

To make changes open the editor (Alt + F11).

In the main menu above, look for Tools and then Options.

In the window that will open go to the second tab, called Editor Format. As soon as it opens you will notice right away that you can change the font and font size that are displayed in the editor, which already helps a lot. But in the little menu on the left, Code Colors, there is a bunch of settings that can be changed to the editor’s colors that make reading the code a lot easier.

Feel free to make the changes you find most convenient, but I’ll leave the configuration I use below.

Setting VBE Colors

I’ll show you the color setting options one by one, as I use here.

Normal Text

Selection Text

Syntax Error Text

Execution Point Text

Breakpoint Text

Comment Text

Keyword Text

Identifier Text

Bookmark Text

Call Return Text

Function Excel is 100% free, consider donating and sharing

Share with the world

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp
Share on reddit

Make a donation

2 thoughts on “Make macros easier to read”

Comment or ask

Check these other posts we have