Share via


PointsToScreenPixelsX Method

Returns a Long value that represents the number of pixels from the left edge of the spreadsheet's window to the left edge the first column in the spreadsheet, plus the value specified in the Points argument.

expression.PointsToScreenPixelsX(Points)

*expression   * Required. An expression that returns a Window object.

Points   Required Long. The number of pixels to add to this method's result.

Remarks

Although the name of this method suggests that it will convert point values to screen pixel values, it actually performs the action described above using only pixel values. For the PointsToScreenPixelsX method, this value will vary by a fixed amount (24 pixels) depending on whether row headers are turned on.

Example

This example returns 25 when row headers are turned on, and returns 1 when row headers are turned off.

Sub Window_OnLoad()

     MsgBox Spreadsheet1.ActiveWindow.PointsToScreenPixelsX(0)   

End Sub

Applies to | Window Object

See Also | PointsToScreenPixelsY Method