Tag Archives: Format

Using the VBA Format Function

Short introduction to strings A string is a sequence or group of characters of any length that may or may not have a semantic meaning in language. It can consist of several characters like numbers, letters in both lowercase and uppercase, punctuation, and symbols. Examples

No Thumbnail

Excel VBA, Horizontal Alignment

In this article I will explain the different horizontal alignment formattings applicable to cells and range. I have also provided the VBA code required to apply them. For examples using horizontal alignment in VBA code please see: Excel VBA, Set Horizontal Alignment, (Sample Code) Excel

No Thumbnail

Access, Fixed Decimal Places Number Format

This article explains how to create a field that will display a fixed number of decimal places in Access using Custom Number Formats. – How to? Open the table in design view. Select the field you want to format. Put as many zeros after the decimal

Access, Add Leading Zeros Custom Number Formats

This article explains how to add leading zeros to numbers in an Access database using Custom Number Formats. – How to? Open the table in design view. Select the field you want to apply leading zeros to. Put as many zeros in the  Format section as

No Thumbnail

Word VBA, Date Format

When writing dates to a word document you could specify a specific format. For example consider the code below: Sub main() Range.Text = Date End Sub It prints the current date to the document: We can change the way the date is output using the code