The Custom Format Builder makes it easy to set number formatting in 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:
If a preset format will not work, use a Custom Format. AutoMacro is pre-loaded with many commonly used Custom Formats:
You can edit the Custom Formats, or design your own from scratch. Microsoft has great documentation about Custom Number Formats here.
Last modified 12 months ago.