加载中…
个人资料
mfkwine
mfkwine
  • 博客等级:
  • 博客积分:0
  • 博客访问:2,101
  • 关注人气:14
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

[VBA]office中内建的faceid所对应的图标

(2019-01-14 00:40:16)
标签:

vba

faceid

分类: 办公软件使用技巧
转载自:https://blog.csdn.net/owen_oy/article/details/261655 
调试可用。
Sub ShowFaceIDs()
    Dim NewToolbar As CommandBar
    Dim NewButton As CommandBarButton
    Dim i As Integer, IDStart As Integer, IDStop As Integer
    
 Delete existing FaceIds toolbar if it exists
    On Error Resume Next
    Application.CommandBars("FaceIds").Delete
    On Error GoTo 0
    
 Add an empty toolbar
    Set NewToolbar = Application.CommandBars.Add _
        (Name:="FaceIds", temporary:=True)
    NewToolbar.Visible = True
    
 Change the following values to see different FaceIDs
    IDStart = 1
    IDStop = 800
    
    For i = IDStart To IDStop
        Set NewButton = NewToolbar.Controls.Add _
            (Type:=msoControlButton, ID:=2950)
        NewButton.FaceId = i
        NewButton.Caption = "FaceID = " & i
    Next i
    NewToolbar.Width = 600
End Sub

0

阅读 收藏 喜欢 打印举报/Report
前一篇:MFC类概述
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有