Hi All,
I followed this post to make a custom floating menu
http://www.excelforum.com/excel-new-...ol-button.html
But i was wondering if there was anyway to customise the icon?
As it is it deletes the toolbar every time i close the workbook, which is what i want.
I tried adding .Faceid = 420 into the vba between .Caption = "My Button" and .Style = msoButtonCaption, but it didn't do anything.
Any help appreciated.
Regards
Gene
You can use the FaceId property
I have a tool to find FaceIds that I'll try to post laterOption Explicit Sub Create_Bar() Dim MyBar As CommandBar Dim MyPopup As CommandBarPopup Dim MyButton As CommandBarButton Delete_Bar 'make sure commandbar isn't already running Set MyBar = CommandBars.Add(Name:="My Menu", _ Position:=msoBarFloating, temporary:=True) With MyBar .Top = 175 .Left = 850 Set MyPopup = .Controls.Add(Type:=msoControlPopup) With MyPopup .Caption = "My Tools" 'change to suit .BeginGroup = True Set MyButton = .Controls.Add(Type:=msoControlButton) With MyButton .Caption = "testmacro" 'enter name of macro to run .Style = msoButtonCaption .BeginGroup = True .FaceId = 610 .OnAction = "TestMacro" 'macro to be run,change to EmailSLA End With 'this code to add another button Set MyButton = .Controls.Add(Type:=msoControlButton) With MyButton .Caption = "Button 2" .FaceId = 611 .Style = msoButtonCaption .BeginGroup = False .OnAction = "TestMacro" End With End With .Width = 150 .Visible = True End With End Sub
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!
Read this to understand why we ask you to do this, then please edit your first post here to add links to any and all crossposts in other forums.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks