Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to insert a Face ID onto a Command Button that'son a Userform. I know
the number (1106), but have not figured out how to put it onto the control? Ideas? Thanks for the help in advance! Denny |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I believe that you would have to copy the image from the ToolbarButton and
then paste it onto the CommandButton, since the latter does not have a FaceID property. It may be possible to get a FaceID into the Clipboard using APIs, but I don't know offhand how to go about it. -- Vasant "Denny Behnfeldt" wrote in message ... I need to insert a Face ID onto a Command Button that'son a Userform. I know the number (1106), but have not figured out how to put it onto the control? Ideas? Thanks for the help in advance! Denny |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Denny,
Select the command buton you want and in the property window selet the Picture property and click on the three dots. if you have a picture folder ( or find your picture folder)open it and select the picture you want. HTh charles --- Message posted from http://www.ExcelForum.com/ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Denny,
I've tried to tie together the two previous answers and this is what I came up with: This macro temporarily creates a toolbar and a button on it with faceid #1106. The copyface command then puts the faceid onto the clipboard. Then the temporary toolbar is deleted. From there you can paste the faceid into the picture property box as described in Charles' answer to your post. I'm not sure the error handling is correct, but I was trying to make sure the toolbar is deleted no matter what. Tested in XL 2000: Sub test() Dim cbar As CommandBar Dim cbarbutton As CommandBarButton On Error GoTo err_handler Set cbar = CommandBars.Add Set cbarbutton = cbar.Controls.Add With cbarbutton .FaceId = 1106 .CopyFace End With err_handler: If Not cbar Is Nothing Then cbar.Delete End If End Sub hth, Doug "Denny Behnfeldt" wrote in message ... I need to insert a Face ID onto a Command Button that'son a Userform. I know the number (1106), but have not figured out how to put it onto the control? Ideas? Thanks for the help in advance! Denny |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Doug Glancy" wrote in message ...
macro temporarily creates a toolbar and a button on it with faceid #1106. The copyface command then puts the faceid onto the clipboard. Then the temporary toolbar is deleted. From there you can paste the faceid into the picture property box as described in Charles' answer to your post. Or you could at this point persist it e.g. open Paint, choose paste and save the image to disk. -- |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You have received good advice on getting an ID into the clipboard.
To get the picture from the clipboard to the control in code, you might have a look at Stephen Bullen's PastePicture file http://www.bmsltd.ie/Excel/Default.htm It is a little over half way down the page. -- Regards, Tom Ogilvy "Denny Behnfeldt" wrote in message ... I need to insert a Face ID onto a Command Button that'son a Userform. I know the number (1106), but have not figured out how to put it onto the control? Ideas? Thanks for the help in advance! Denny |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change the face color of an Excel command button | Excel Discussion (Misc queries) | |||
Inserting a Graphic on a Button when the Button is Assigned to a M | Excel Discussion (Misc queries) | |||
Problem face in Validation Command (Pop-up Error Box) | Excel Worksheet Functions | |||
How To: Command Bar Face ID property | Excel Programming | |||
Command Button vs Control Button | Excel Programming |