reference code below:
Option Explicit Sub del_faceID() On Error Resume Next Application.CommandBars("faceid").Delete On Error GoTo 0 End Sub Sub add_faceID()
'----------------------------- 'Thanks for downloading the code. 'Please visit our channel for a quick explainer on this code. 'Feel free to update the code as per your need and also share with your friends. 'Download free codes from http://vbaa2z.blogspot.com 'Subscribe channel: youtube.com/vbaa2z 'Author: L Pamai (vbaa2z.team@gmail.com) '----------------------------- Dim cmdBar As CommandBar, bt As CommandBarButton, i& del_faceID Set cmdBar = Application.CommandBars.Add _ (Name:="faceid", temporary:=True) cmdBar.Visible = True For i = 1 To 1000 Set bt = cmdBar.Controls.Add(Type:=msoControlButton, ID:=2950) bt.FaceId = i: bt.Caption = i Next i End Sub
No comments:
Post a Comment
Note: only a member of this blog may post a comment.