小编Nor*_*rby的帖子

将形状大小转换为厘米

我有用于更改形状大小的 VBA 代码,但我想将数字转换为厘米。关于如何转换这些数字的任何建议?
另一个问题是我想为多个选定的形状更改相同的大小;你能帮我解决这个问题吗?

非常感谢!

Sub test()
    Dim objHeigh As Integer
    Dim objWidth As Integer
    Dim oSh As Shape

    On Error GoTo CheckErrors

    With ActiveWindow.Selection.ShapeRange
        If .Count = 0 Then
            MsgBox "You need to select a shape first"
            Exit Sub
        End If
    End With

    For Each oSh In ActiveWindow.Selection.ShapeRange
        objHeigh = oSh.Height
        objWidth = oSh.Width

        objHeigh = CInt(InputBox$("Assign a new size of Height", "Heigh", objHeigh))
        ' give the user a way out
        If objHeigh = 0 Then
            Exit Sub
        End …
Run Code Online (Sandbox Code Playgroud)

powerpoint vba

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

powerpoint ×1

vba ×1