Custom Format Builder

What does it do?

The Custom Format Builder makes it easy to set number formatting in VBA.

vba format builder

How to Access it?

vba format generator

Custom Format Builder Walkthrough

Numbers and VBA

By Default, VBA uses the General Number format when displaying numbers. The General Format is an unformatted decimal number.

Instead, to display numbers properly (percent, dollars, etc.), VBA will need to know the proper format. VBA has several preset formats to choose from:

vba format writer

If a preset format will not work, use a Custom Format. AutoMacro is pre-loaded with many commonly used Custom Formats:

vba format builder 2

You can edit the Custom Formats, or design your own from scratch. Microsoft has great documentation about Custom Number Formats here.

Last modified 3 years ago.

^ Top