Points 必需 Long 从文档窗口的顶部开始沿其左边缘垂直排列的点数。返回值长型示例本示例确定活动窗口中所选单元格) 的高度和宽度 (像素,并返回 和 lWinHeight 变量中的lWinWidth值。VB 复制 With ActiveWindow lWinWidth = _ .PointsToScreenPixelsX(.Selection.Width) lWinHeight = _ .PointsToScreenPixelsY...
1 首先我们打开一个工作样表作为例子。2 我们使用alt+f11组合快捷键进入vbe编辑器,插入一个新的模块,并在模块中输入以下代码:Sub testWidthOrHeight() Dim lWinWidth As Long, lWinHeight As Long With ActiveWindow lWinWidth = .PointsToScreenPixelsX(.Selection.Width) lWinHeight = .PointsToScreenPi...
将横向度量值由以点(文档坐标)为单位转换为以屏幕像素(屏幕坐标)为单位。返回转变后的度量值(Long 类型)。 expression.PointsToScreenPixelsX(P…
VbTwips 1 (缺省值)缇(每逻辑英寸为 1440 缇;每逻辑厘米为 567 个缇)。 VbPoints 2 磅(每逻辑英寸为 72 个磅)。 VbPixels 3 像素(监视器或打印机分辨率的最小单位)。 VbCharacters 4 字符(水平每个单位=120 缇;垂直每个单位=240 缇。) VbInches 5 英寸。 VbMillimeters 6 毫米。 VbCentimeters 7 厘米。
Excel Assembly: Microsoft.Office.Interop.Excel.dll C# Copy public int PointsToScreenPixelsX (int Points); Parameters Points Int32 Returns Int32 Applies to ProductVersions Excel primary interop assembly Latest Feedback Was this page helpful? Yes No In this article Definition Ap...
expression.PointsToScreenPixelsX(Points) expressionA variable that represents aPaneobject. Parameters NameRequired/OptionalData typeDescription PointsRequiredLongLocation of the pixel on the screen. Return value Long Support and feedback Have questions or feedback about Office VBA or this documentation?
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.VB Copy With ActiveWindow lWinWidth = _ .PointsToScreenPixelsX(.Selection.Width) lWinHeight = _ .PointsToScreenPixelsY(....
Returns or sets the location of the pixel on the screen. C# 複製 public int PointsToScreenPixelsY (int Points); Parameters Points Int32 Location of the starting point. Returns Int32 Integer Applies to 產品版本 Excel primary interop assembly Latest ...
' 指定单元格中⼼在屏幕坐标中X轴的位置,以像素为单位 pt.x = ActiveWindow.PointsToScreenPixelsX(0) + _Point2PixelX(Cells(iRow, iCol).Left + Cells(iRow, iCol).Width / 2)' 指定单元格中⼼在屏幕坐标中Y轴的位置,以像素为单位 pt.y = ActiveWindow.PointsToScreenPixelsY(0) + _Poin...
WindowPointsToScreenPixelsX, PointsToScreenPixelsY, RangeFromPoint, ScrollIntoView WorkbookReloadAs, WebPagePreview New Methods (Alphabetic List) In Excel 2000, many new VBA methods have been added to existing objects. These methods are listed in the following table, sorted alphabetically by method ...