Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 1.3 KB

Excel.Window.PointsToScreenPixelsY.md

File metadata and controls

52 lines (33 loc) · 1.3 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Window.PointsToScreenPixelsY method (Excel)
vbaxl10.chm356130
vbaxl10.chm356130
Excel.Window.PointsToScreenPixelsY
ec25e6d4-22c1-2444-9582-37187901ae02
05/21/2019
medium

Window.PointsToScreenPixelsY method (Excel)

Converts a vertical measurement from points (document coordinates) to screen pixels (screen coordinates). Returns the converted measurement as a Long value.

Syntax

expression.PointsToScreenPixelsY (Points)

expression A variable that represents a Window object.

Parameters

Name Required/Optional Data type Description
Points Required Long The number of points vertically along the left edge of the document window, starting from the top.

Return value

Long

Example

This example determines the height and width (in pixels) of the selected cells in the active window and returns the values in the lWinWidth and lWinHeight variables.

With ActiveWindow 
 lWinWidth = _ 
 .PointsToScreenPixelsX(.Selection.Width) 
 lWinHeight = _ 
 .PointsToScreenPixelsY(.Selection.Height) 
End With

[!includeSupport and feedback]