PointsToScreenPixelsY 方法

       

将纵向度量值由以点(文档坐标)为单位转换为以屏幕像素(屏幕坐标)为单位。返回转变后的度量值(Long 类型)。

expression.PointsToScreenPixelsY(Points)

expression   该表达式返回一个 Window 对象。

Points   Long 类型,必需。从文档窗口的顶部开始沿其左边缘的纵向点数。

示例

本示例确定活动窗口中选定单元格的高度和宽度(单位:像素),并将值返回到变量 lWinWidthlWinHeight 中。

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