PointsToScreenPixelsY Method 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