Hi, in Excel 13 (Windows 10), I have a CommandBarButton (set in the variable "cbb") with FaceId set and a UserForm (named "UF"). I want to show UF with the title-bar icon identical with the ccb picture. I want neither the export to file nor the import from file. Something like this:

--------------------------------------------------------------
Private Declare Function FindWindowA& Lib ...
Private Declare Sub SendMessageA Lib ...
Dim cbb as CommandBarButton, hic&

With Application.CommandBars("Worksheet Menu Bar")
.Protection = 0 'unprotect the menu
... create some CommandBarButtons here with FaceIds set to something ...
.Protection = 1 'protect the menu
.Enabled = True 'show the menu
Set cbb = .Controls(1)
End With

... ??? ... 'Is there an easy short way to get the icon...
... hic = ??? ... '...and its handle "hic" from cbb.Picture?

SendMessageA FindWindowA("ThunderDFrame", UF.Caption), &H80, 0, hic 'install the icon on the userform title-bar
UF.Show
--------------------------------------------------------------

If I got, instead of an icon, a bitmap with its handle and its mask handle, I could use the API function CreateIconIndirect. Unfortunately, cbb.Picture.Handle and cbb.Mask.Handle are not bitmap handles.

My (not good) solution is to export commandbarbuttons' pictures to bitmap files once, convert them into icon files, create a DLL with the icons and read them in runtime via the API function LoadIconA (or ExtractIconA). I don't like it - if I changed the menu and/or FaceIds, I'd repeat the whole work again.