Width Property [Excel 2003 VBA Language Reference]
Width property as it applies to the Application object.
The distance, in points, from the left edge of the application window to its right edge. If the window is minimized, Application.Width
is read-only and returns the width of the window icon. Read/write Double.
expression.Width
expression Required. An expression that returns an Application object.
Width property as it applies to the Window object.
The width, in points, of the window. Use the UsableWidth property to determine the maximum size for the window. You cannot set this property if the window is maximized or minimized. Use the WindowState property to determine the window state. Read/write Double.
expression.Width
expression Required. An expression that returns a Window object.
Width property as it applies to the ChartObject, ChartObjects, Legend, OLEObject, OLEObjects, and PlotArea objects.
The width, in points, of the object. Read/write Double.
expression.Width
expression Required. An expression that returns one of the above objects.
Width property as it applies to the Axis, ChartArea, LegendEntry, and LegendKey objects.
The width, in points, of the object. Read-only Double.
expression.Width
expression Required. An expression that returns one of the above objects.
Width property as it applies to the Graphic, Shape, and ShapeRange objects.
The width, in points, of the object. Read/write Single.
expression.Width
expression Required. An expression that returns one of the above objects.
Width property as it applies to the Range object.
The width, in points, of the range. Read-only Variant.
expression.Width
expression Required. An expression that returns a Range object.
Example
As it applies to the Application object.
This example expands the active window to the maximum size available (assuming that the window isn't maximized).
With ActiveWindow
.WindowState = xlNormal
.Top = 1
.Left = 1
.Height = Application.UsableHeight
.Width = Application.UsableWidth
End With
As it applies to the ChartArea, ChartObject, ChartObjects, Legend, OLEObject, OLEObjects, and PlotArea objects.
This example sets the width of the embedded chart.
Worksheets("Sheet1").ChartObjects(1).Width = 360
Applies to | Application Object | Axis Object | ChartArea Object | ChartObject Object | ChartObjects Collection Object | Graphic Object | Legend Object | LegendEntry Object | LegendKey Object | OLEObject Object | OLEObjects Collection Object | PlotArea Object | Range Collection | Shape Object | ShapeRange Collection | Window Object
See Also | Height Property | Left Property | Top Property