Could Anyone Show List of Button Face Id in Excel 2010

后端 未结 6 2168
独厮守ぢ
独厮守ぢ 2021-02-06 05:31

I would like to create costum menu button using VBA in my excel 2010 file using predefined excel button that use face id. In my case i would like to use \"lock\" and \"refresh\

6条回答
  •  醉话见心
    2021-02-06 06:20

    script provides on worksheet name of controls excel 2010/2013

    Sub IDsErmitteln()
    Dim crtl As CommandBarControl
    Dim i As Integer
    Worksheets.Add
    On Error Resume Next
    i = 1
    For Each crtl In Application.CommandBars(1).Controls(1).Controls
    Cells(i, 1).Value = crtl.Caption
    Cells(i, 2).Value = crtl.ID
    i = i + 1
    Next crtl
    End Sub
    

提交回复
热议问题