ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   own-made FaceID 's or command buttons in menu bar (https://www.excelbanter.com/excel-programming/284625-own-made-faceid-s-command-buttons-menu-bar.html)

Oscar

own-made FaceID 's or command buttons in menu bar
 
I have build some menu controls with the faceID assignment. However, I could
not find the right faceID's for my case bacause I would like to have some
kind of a command button with a short description ( two or 3 characters) .
Is there a way to make my own faceID for an Excel menu or a possibility to
display some commandbuttons next to each other at the Excel menu bar ?

Oscar



Robin Hammond[_2_]

own-made FaceID 's or command buttons in menu bar
 
Oscar,

To make your own faceID, you can copy a custom face to a worksheet and use
the pasteface method for a command bar.

View, Toolbars, Customise (launches a dialog). Select the Controls tab, at
the bottom is a group called Macros. Drag the smiley face onto any toolbar.
Right click on the smiley face once it is on the toolbar and select Edit.
Create your own toolbar face. Right click again and select copy. Close the
dialog. Select a cell on your worksheet, hit ctrl V to paste your custom
button. It probably helps to type a name for your new button in the name box
at the bottom left of the formula bar.

If you look on www.j-walk.com there is code to build a command bar that I
won't repeat in full here since it was created by John Walkenbach. One of my
variations on this is to add my own custom buttons using the pasteface
command. e.g I have named every custom face the same as the row that it is
in, as PIC1, PIC2 etc.

then use this variation on the Walkenback code.

Set W = ThisWorkbook.Sheets("MenuSheet")
RowNum = 1
Do While W.Cells(RowNum, 2) < ""

W.Shapes("PIC" & RowNum).Copy 'COPY THE PIC FROM YOUR SHEET
Set ctlInsert = cbrWiz.Controls.Add

With ctlInsert
.Style = msoButtonIcon
.Caption = W.Cells(RowNum, 2)
.Tag = W.Cells(RowNum, 2)
.OnAction = W.Cells(RowNum, 3)
.PasteFace 'PASTE THE PIC AS A CUSTOM FACE ON YOUR NEW BUTTON

If W.Cells(RowNum, 4) = True Then .BeginGroup = True

End With
RowNum = RowNum + 1
Loop

Robin Hammond
www.enhanceddatasystems.com


"Oscar" wrote in message
ll.nl...
I have build some menu controls with the faceID assignment. However, I

could
not find the right faceID's for my case bacause I would like to have some
kind of a command button with a short description ( two or 3 characters) .
Is there a way to make my own faceID for an Excel menu or a possibility to
display some commandbuttons next to each other at the Excel menu bar ?

Oscar






All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com