Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Inserting a Face ID onto a Command button

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Inserting a Face ID onto a Command button

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Inserting a Face ID onto a Command button

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Inserting a Face ID onto a Command button

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Inserting a Face ID onto a Command button

"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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Inserting a Face ID onto a Command button

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
change the face color of an Excel command button Chris Leah Excel Discussion (Misc queries) 5 April 21st 23 09:03 AM
Inserting a Graphic on a Button when the Button is Assigned to a M smck Excel Discussion (Misc queries) 2 October 27th 09 04:46 PM
Problem face in Validation Command (Pop-up Error Box) Nono Excel Worksheet Functions 1 September 3rd 07 01:38 PM
How To: Command Bar Face ID property Kevin McCartney[_2_] Excel Programming 2 December 9th 03 01:58 PM
Command Button vs Control Button RGibson Excel Programming 1 October 14th 03 02:24 AM


All times are GMT +1. The time now is 03:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"