CenterVertically Property
CenterVertically returns or sets the vertical centering of the page setup for the worksheet. It has a Boolean value. If this value is set to 'True', the printout is centered vertically. If it is set to 'False', the worksheet prints in the upper left corner of the page.
Syntax
object.CenterVertically
object. CenterVertically = VCenter
Parameter |
Type |
Description |
VCenter |
Boolean |
required |
Example 1
This example demonstrates how to return whether or not worksheet contents will be centered vertically when printed.
Debug .Print WksPageSetup.CenterVertically
Example 2
This example demonstrates how to vertically center worksheet contents to be printed.
WksPageSetup.CenterVertically = True
Used by: WksPageSetup object