VAlignment Property Example

This example creates a merged cell, places a value in the cell, and then centers the value within the cell.

Spreadsheet1.Range("a1:c3").Merge
Spreadsheet1.Range("a1").Value = "Monday"
Set c = Spreadsheet1.Constants
Spreadsheet1.Range("a1").VAlignment = c.ssVAlignCenter
Spreadsheet1.Range("a1").HAlignment = c.ssHAlignCenter