Left Property

Applies To

Application Object, Arc Object, Arcs Collection, AxisTitle Object, Button Object, Buttons Collection, ChartArea Object, ChartObject Object, ChartObjects Collection, ChartTitle Object, CheckBox Object, DataLabel Object, DialogFrame Object, Drawing Object, DrawingObjects Collection, Drawings Collection, DropDown Object, DropDowns Collection, EditBox Object, EditBoxes Collection, GroupBox Object, GroupBoxes Collection, GroupObject Object, GroupObjects Collection, Label Object, Labels Collection, Legend Object, Line Object, Lines Collection, ListBox Object, ListBoxes Collection, OLEObject Object, OLEObjects Collection, OptionButton Object, OptionButtons Collection, Oval Object, Ovals Collection, Picture Object, Pictures Collection, PlotArea Object, Range Object, Rectangle Object, Rectangles Collection, ScrollBar Object, ScrollBars Collection, Spinner Object, Spinners Collection, TextBox Object, TextBoxes Collection, Toolbar Object, Window Object.

Description

Returns or sets the position of the specified object, in points (1/72 inch). Read-write, except for the Range object.

Remarks

The Left property has several different meanings, depending on the object it is applied to.

Object

Meaning

Application

The distance from the left edge of the physical screen to the left edge of the main Microsoft Excel window, in points.

ClipboardWindow

Macintosh only. The left position of the window, in points, measured from the left edge of the usable area (below the menus, left-docked toolbars, and/or the formula bar).

Range

The distance from the left edge of column A to the left edge of the range, in points. If the range is discontinuous, the first area is used. If the range is more than one column wide, the leftmost column in the range is used. Read-only.

Toolbar

If the toolbar is docked (its Position property is not xlFloating), the number of points from the left edge of the toolbar to the left edge of the toolbar's docking area.

If the toolbar is floating, the number of points from the left edge of the toolbar to the left edge of the Microsoft Excel workspace.

Window

The left position of the window, in points, measured from the left edge of the usable area.

Arc, AxisTitle, Button, ChartArea, ChartTitle, CheckBox, DataLabel, DialogFrame, Drawing, DrawingObjects, DropDown, EditBox, GroupObject, GroupBox, Label, Legend, Line, ListBox, OLEObject, OptionButton, Oval, Picture, PlotArea, Rectangle, ScrollBar, Spinner, TextBox

The left position of the object, in points, measured from the left edge of column A (on a worksheet) or the upper left of the chart area (on a chart).


If the window is maximized, the Application.Left property returns a negative number that varies based on the width of the window border. Setting Application.Left to zero will make the window a tiny bit smaller than it would if the application window were maximized. In other words, if Application.Left is zero, the left border of the main Microsoft Excel window will just be visible on screen.

On the Apple Macintosh, Application.Left is always zero. Setting this value to something else on the Macintosh will have no effect.

With Microsoft Windows, if the Microsoft Excel window is minimized, Application.Left controls the position of the icon.

See Also

Height Property, Top Property, Width Property.

Example

This example moves oval one on Sheet1 so that it is aligned with the left edge of column B.


Worksheets("Sheet1").Ovals(1).Left = _
    Worksheets("Sheet1").Columns("B").Left

This example aligns the left edge of every button on Sheet1 to the left edge of column B.


leftEdge = Worksheets("Sheet1").Columns("B").Left
For Each b In Worksheets("Sheet1").Buttons
    b.Left = leftEdge
Next b