任何人都可以在 Excel 2010 中显示按钮 Face ID 列表

发布于 2024-12-03 23:05:30 字数 136 浏览 0 评论 0原文

我想使用 VBA 在我的 excel 2010 文件中使用使用面 ID 的预定义 excel 按钮创建服装菜单按钮。就我而言,我想使用“锁定”和“刷新”图标,但不知道该图标的面部ID。谁能向我展示或指出 excel 2010 中使用的按钮和面 ID 的列表?

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" icon, but doesn`t know the face id for that icon. could anyone show or point me the list of button and face id used in excel 2010?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

摇划花蜜的午后 2024-12-10 23:05:31

我在这个位置找到了我正在查看的内容

http://support.microsoft.com/default.aspx?scid=kb;[LN];Q213552

该表包含 Excel 中使用的控件和 id (Face Id)。因此,对于“刷新”按钮,面部 ID 为 459,但它仅适用于小于 3 位的 ID。

这个生成器(通过输入起始面ID和结束面ID)然后单击显示按钮面,您将获得范围内的图标列表(要下载它必须先登录)

http://www.ozgrid.com/forum/showthread.php?t=39992

以及功能区工具栏

http://www.rondebruin.nl/ribbon.htm

I found it in this location what i`m looking at

http://support.microsoft.com/default.aspx?scid=kb;[LN];Q213552

The table contain the Control and id (Face Id) used in excel. So for "Refresh" button the face id is 459, but it only work on the id less than 3 digit.

and this generator(by input start face id and end face id) then click show button faces, you get the list of icon on the range (to download it must login first)

http://www.ozgrid.com/forum/showthread.php?t=39992

and this for Ribbon Toolbar

http://www.rondebruin.nl/ribbon.htm

铜锣湾横着走 2024-12-10 23:05:30

以下 Sub BarOpen() 适用于 Excel 2010,很可能也适用于许多其他版本,并在选项卡“加载项”中生成一个自定义的临时工具栏,其中包含下拉菜单以显示来自的 FaceID 1 .. 5020,每组 30 项。

Option Explicit

Const APP_NAME = "FaceIDs (Browser)"

' The number of icons to be displayed in a set.
Const ICON_SET = 30

Sub BarOpen()
  Dim xBar As CommandBar
  Dim xBarPop As CommandBarPopup
  Dim bCreatedNew As Boolean
  Dim n As Integer, m As Integer
  Dim k As Integer

  On Error Resume Next
  ' Try to get a reference to the 'FaceID Browser' toolbar if it exists and delete it:
  Set xBar = CommandBars(APP_NAME)
  On Error GoTo 0
  If Not xBar Is Nothing Then
    xBar.Delete
    Set xBar = Nothing
  End If

  Set xBar = CommandBars.Add(Name:=APP_NAME, Temporary:=True) ', Position:=msoBarLeft
  With xBar
    .Visible = True
    '.Width = 80
    For k = 0 To 4 ' 5 dropdowns, each for about 1000 FaceIDs
      Set xBarPop = .Controls.Add(Type:=msoControlPopup) ', Before:=1
      With xBarPop
        .BeginGroup = True
        If k = 0 Then
          .Caption = "Face IDs " & 1 + 1000 * k & " ... "
        Else
          .Caption = 1 + 1000 * k & " ... "
        End If
        n = 1
        Do
          With .Controls.Add(Type:=msoControlPopup) '34 items * 30 items = 1020 faceIDs
            .Caption = 1000 * k + n & " ... " & 1000 * k + n + ICON_SET - 1
            For m = 0 To ICON_SET - 1
              With .Controls.Add(Type:=msoControlButton) '
                .Caption = "ID=" & 1000 * k + n + m
                .FaceId = 1000 * k + n + m
              End With
            Next m
          End With
          n = n + ICON_SET
        Loop While n < 1000 ' or 1020, some overlapp
      End With
    Next k
  End With 'xBar
End Sub

The following Sub BarOpen() works with Excel 2010, most probably also many other versions also, and generates in the Tab "Add-Ins" a custom, temporary toolbar with drop-downs to show the FaceIDs from 1 .. 5020 in groups of 30 items.

Option Explicit

Const APP_NAME = "FaceIDs (Browser)"

' The number of icons to be displayed in a set.
Const ICON_SET = 30

Sub BarOpen()
  Dim xBar As CommandBar
  Dim xBarPop As CommandBarPopup
  Dim bCreatedNew As Boolean
  Dim n As Integer, m As Integer
  Dim k As Integer

  On Error Resume Next
  ' Try to get a reference to the 'FaceID Browser' toolbar if it exists and delete it:
  Set xBar = CommandBars(APP_NAME)
  On Error GoTo 0
  If Not xBar Is Nothing Then
    xBar.Delete
    Set xBar = Nothing
  End If

  Set xBar = CommandBars.Add(Name:=APP_NAME, Temporary:=True) ', Position:=msoBarLeft
  With xBar
    .Visible = True
    '.Width = 80
    For k = 0 To 4 ' 5 dropdowns, each for about 1000 FaceIDs
      Set xBarPop = .Controls.Add(Type:=msoControlPopup) ', Before:=1
      With xBarPop
        .BeginGroup = True
        If k = 0 Then
          .Caption = "Face IDs " & 1 + 1000 * k & " ... "
        Else
          .Caption = 1 + 1000 * k & " ... "
        End If
        n = 1
        Do
          With .Controls.Add(Type:=msoControlPopup) '34 items * 30 items = 1020 faceIDs
            .Caption = 1000 * k + n & " ... " & 1000 * k + n + ICON_SET - 1
            For m = 0 To ICON_SET - 1
              With .Controls.Add(Type:=msoControlButton) '
                .Caption = "ID=" & 1000 * k + n + m
                .FaceId = 1000 * k + n + m
              End With
            Next m
          End With
          n = n + ICON_SET
        Loop While n < 1000 ' or 1020, some overlapp
      End With
    Next k
  End With 'xBar
End Sub
春花秋月 2024-12-10 23:05:30

看看这里:

Face ID

它是 MS Excel 的插件。适用于 Excel 97 及更高版本。

Have a look here:

Face ID's

Its an addin for MS excel. Works for excel 97 and later.

夏见 2024-12-10 23:05:30

我整理了自己的按钮面部 ID 列表。我使用 Excel VBA 代码测试了最多 100,000 个工具面数字。身份证号码多达近 34,000 个。其中大多数都有重复项,这使得它们更难查看。我使用 VBA 数组列表相互比较所有面孔,并且只保留每个面孔的第一个实例。我认为这个文件显示了所有工具面及其编号,但它只显示每个工具面一次:
https://www.dropbox.com/s/ 7q7y7uf3tuy02uu/FaceID%20Excel%202021.pdf?dl=0

I put together my own list of button face ID's. I used Excel VBA code to test all the toolface numbers up to 100,000. There were faces for ID numbers up to almost 34,000. Most of these had duplicates, which make them harder to look through. I compared all the faces to each other using a VBA arraylist, and only kept the first instance of each one. I think this file shows all the toolfaces with their numbers, but it only shows each one once:
https://www.dropbox.com/s/7q7y7uf3tuy02uu/FaceID%20Excel%202021.pdf?dl=0

捂风挽笑 2024-12-10 23:05:30

修改了之前的答案,以创建多个包含 10 个图标集的工具栏。可以更改代码(注释/取消注释)工具栏数量(速度较慢的计算机上性能可能会很慢)

我能找到的 Office 2013 的最后一个图标编号是 OneDrive 的 25424

Sub FaceIdsOutput()
' ==================================================
' FaceIdsOutput Macro
' ==================================================
' =========================
Dim sym_bar As CommandBar
Dim cmd_bar As CommandBar
' =========================
Dim i_bar As Integer
Dim n_bar_ammt As Integer
Dim i_bar_start As Integer
Dim i_bar_final As Integer
' =========================
Dim icon_ctrl As CommandBarControl
' =========================
Dim i_icon As Integer
Dim n_icon_step As Integer
Dim i_icon_start As Integer
Dim i_icon_final As Integer
' =========================
n_icon_step = 10
' =========================
i_bar_start = 1
n_bar_ammt =  500
' i_bar_start = 501
' n_bar_ammt =  1000
' i_bar_start = 1001
' n_bar_ammt =  1500
' i_bar_start = 1501
' n_bar_ammt =  2000
' i_bar_start = 2001
' n_bar_ammt =  2543
i_bar_final = i_bar_start + n_bar_ammt - 1
' =========================
' delete toolbars
' =========================
For Each cmd_bar In Application.CommandBars
    If InStr(cmd_bar.Name,"Symbol") <> 0 Then
        cmd_bar.Delete
    End If
Next
' =========================
' create toolbars
' =========================
For i_bar = i_bar_start To i_bar_final
    On Error Resume Next
    Set sym_bar = Application.CommandBars.Add _
        ("Symbol" & i_bar, msoBarFloating, Temporary:=True)
    ' =========================
    ' create buttons
    ' =========================
    i_icon_start = (i_bar-1) * n_icon_step + 1
    i_icon_final = i_icon_start + n_icon_step - 1
    For i_icon = i_icon_start To i_icon_final
        Set icon_ctrl = sym_bar.Controls.Add(msoControlButton)
        icon_ctrl.FaceId = i_icon
        icon_ctrl.TooltipText = i_icon
        Debug.Print ("Symbol = " & i_icon)
    Next i_icon
    sym_bar.Visible = True
Next i_bar
End Sub
Sub DeleteFaceIdsToolbar()
' ==================================================
' DeleteFaceIdsToolbar Macro
' ==================================================
Dim cmd_bar As CommandBar
For Each cmd_bar In Application.CommandBars
    If InStr(cmd_bar.Name,"Symbol") <> 0 Then
        cmd_bar.Delete
    End If
Next
End Sub

Modified previous answer to create numerous toolbars with sets of 10 icons. Can change code (comment/un-comment) number of toolbars (performance may be slow on slower machines)

The last icon number for Office 2013 that I could find was 25424 for OneDrive

Sub FaceIdsOutput()
' ==================================================
' FaceIdsOutput Macro
' ==================================================
' =========================
Dim sym_bar As CommandBar
Dim cmd_bar As CommandBar
' =========================
Dim i_bar As Integer
Dim n_bar_ammt As Integer
Dim i_bar_start As Integer
Dim i_bar_final As Integer
' =========================
Dim icon_ctrl As CommandBarControl
' =========================
Dim i_icon As Integer
Dim n_icon_step As Integer
Dim i_icon_start As Integer
Dim i_icon_final As Integer
' =========================
n_icon_step = 10
' =========================
i_bar_start = 1
n_bar_ammt =  500
' i_bar_start = 501
' n_bar_ammt =  1000
' i_bar_start = 1001
' n_bar_ammt =  1500
' i_bar_start = 1501
' n_bar_ammt =  2000
' i_bar_start = 2001
' n_bar_ammt =  2543
i_bar_final = i_bar_start + n_bar_ammt - 1
' =========================
' delete toolbars
' =========================
For Each cmd_bar In Application.CommandBars
    If InStr(cmd_bar.Name,"Symbol") <> 0 Then
        cmd_bar.Delete
    End If
Next
' =========================
' create toolbars
' =========================
For i_bar = i_bar_start To i_bar_final
    On Error Resume Next
    Set sym_bar = Application.CommandBars.Add _
        ("Symbol" & i_bar, msoBarFloating, Temporary:=True)
    ' =========================
    ' create buttons
    ' =========================
    i_icon_start = (i_bar-1) * n_icon_step + 1
    i_icon_final = i_icon_start + n_icon_step - 1
    For i_icon = i_icon_start To i_icon_final
        Set icon_ctrl = sym_bar.Controls.Add(msoControlButton)
        icon_ctrl.FaceId = i_icon
        icon_ctrl.TooltipText = i_icon
        Debug.Print ("Symbol = " & i_icon)
    Next i_icon
    sym_bar.Visible = True
Next i_bar
End Sub
Sub DeleteFaceIdsToolbar()
' ==================================================
' DeleteFaceIdsToolbar Macro
' ==================================================
Dim cmd_bar As CommandBar
For Each cmd_bar In Application.CommandBars
    If InStr(cmd_bar.Name,"Symbol") <> 0 Then
        cmd_bar.Delete
    End If
Next
End Sub
少女净妖师 2024-12-10 23:05:30

简短的脚本写入十个(循环设置为 10)FaceID 的添加。作为工具栏选项卡“加载项”和“Benutzerdefinierte Symbolliste löschen”的条目 - 您删除此添加条目(标记并单击鼠标右键) - 适用于 excel 2010/2013

Sub FaceIdsAusgeben()
Dim symb As CommandBar
Dim Icon As CommandBarControl
Dim i As Integer
On Error Resume Next
Set symb = Application.CommandBars.Add _
("Symbole", msoBarFloating)
For i = 1 To 10
Set Icon = symb.Controls.Add(msoControlButton)
Icon.FaceId = i
Icon.TooltipText = i
Debug.Print ("Symbole = " & i)
Next i
symb.Visible = True
End Sub

short script writes ten (loop set for 10) FaceID's add. as entry into toolbar Tab "Add-In" and with "Benutzerdefinierte Symbolliste löschen" - you erase this add entry ( mark and right mouse click) - works with excel 2010/2013

Sub FaceIdsAusgeben()
Dim symb As CommandBar
Dim Icon As CommandBarControl
Dim i As Integer
On Error Resume Next
Set symb = Application.CommandBars.Add _
("Symbole", msoBarFloating)
For i = 1 To 10
Set Icon = symb.Controls.Add(msoControlButton)
Icon.FaceId = i
Icon.TooltipText = i
Debug.Print ("Symbole = " & i)
Next i
symb.Visible = True
End Sub
宣告ˉ结束 2024-12-10 23:05:30

脚本在工作表上提供了 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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文