Excel Ribbon 下拉菜单:设置页面比例值

问题描述 投票:0回答:1
excel vba dropdown ribbonx page-setup
1个回答
0
投票
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 sZoom = Mid(id, iLoc + 1)
    If IsNumeric(sZoom) Then ActiveSheet.PageSetup.Zoom = CInt(sZoom)
End Sub
© www.soinside.com 2019 - 2024. All rights reserved.