Mohamed Saligh
Mohamed Saligh

Reputation: 12349

How to add icons to custom menu in excel - vba

I have created some custom menu referring "Custom Menu visible to one document in Excel". Now I want to add some icons to each menu item. Either that may be system icons or some others. Please provide some solution.

Upvotes: 1

Views: 3020

Answers (1)

John Alexiou
John Alexiou

Reputation: 29264

use the .FaceID property. If you want to know what id to use, then download a FaceID Browser addin for excel. Example:

Set MenuItem = NewMenu.Controls.Add _
  (Type:=msoControlButton)
With MenuItem
    .Caption = "Save XML Data"
    .FaceId = 270
    .OnAction = "AskExportXml"
    .Enabled = True
End With

Upvotes: 2

Related Questions