Excel Ribbon dropDown:设置页面比例值(适用于 mac)

问题描述 投票:0回答:1
excel vba dropdown ribbonx page-setup
1个回答
1
投票
  • 控件的
    id
    属性与之前不同。
  • 使用
    Mid
    InStr
  • 提取缩放比例
Sub DropDown2_onAction(control As IRibbonControl, id As String, index As Integer)
    Dim iLoc As Long, sZoom As String
    iLoc = InStr(id, "_")
    If iLoc = 0 Then Exit Sub
    sZoom = Mid(id, iLoc + 1)
    If IsNumeric(sZoom) Then ActiveSheet.PageSetup.Zoom = CInt(sZoom)
End Sub
© www.soinside.com 2019 - 2024. All rights reserved.