ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   info on faceid (https://www.excelbanter.com/excel-programming/409474-info-faceid.html)

johne

info on faceid
 
Hello. I'm using Excel 2003 and setting up several buttons. Rather then a
picture, the users would prefer text on the button face. Here is a sample of
setting the properties but I am not sure of how text is entered for the
..FaceID. If anyone knows, please let me know.

Set Btn = Tb.Controls.Add(Type:=msoControlButton)
With Btn
' .FaceId =
.OnAction = "Refresh_Metric"
.Caption = "This will refresh existing workbook."
End With

Thanks.
John

Jim Rech[_2_]

info on faceid
 
If you want to see the caption instead of an icon you have to change the
button's style:

With Btn
.Style = msoButtonCaption


--
Jim
"JohnE" wrote in message
...
| Hello. I'm using Excel 2003 and setting up several buttons. Rather then
a
| picture, the users would prefer text on the button face. Here is a sample
of
| setting the properties but I am not sure of how text is entered for the
| .FaceID. If anyone knows, please let me know.
|
| Set Btn = Tb.Controls.Add(Type:=msoControlButton)
| With Btn
| ' .FaceId =
| .OnAction = "Refresh_Metric"
| .Caption = "This will refresh existing workbook."
| End With
|
| Thanks.
| John



johne

info on faceid
 
Jim, thanks for the info. Then for the FaceID do I put something like
"Refresh" (using quotes), as the .Caption was for the tool tip when hovering
over the button?
.... John


"Jim Rech" wrote:

If you want to see the caption instead of an icon you have to change the
button's style:

With Btn
.Style = msoButtonCaption


--
Jim
"JohnE" wrote in message
...
| Hello. I'm using Excel 2003 and setting up several buttons. Rather then
a
| picture, the users would prefer text on the button face. Here is a sample
of
| setting the properties but I am not sure of how text is entered for the
| .FaceID. If anyone knows, please let me know.
|
| Set Btn = Tb.Controls.Add(Type:=msoControlButton)
| With Btn
| ' .FaceId =
| .OnAction = "Refresh_Metric"
| .Caption = "This will refresh existing workbook."
| End With
|
| Thanks.
| John




Jim Rech[_2_]

info on faceid
 
When you change the style to msoButtonCaption the .Caption property is both
the caption and the tool tip. That is unless you supply a different tooltip
using the .TooltipText property. Then that value is shown as the tool tip
instead of the caption

With the msoButtonCaption style there is no need for a FaceID value since
there is no image shown.

You can show both an icon and a caption however if you use this style:
msoButtonIconAndCaption. This makes for a pretty big tool button but then a
long caption does too.
--
Jim
"JohnE" wrote in message
...
| Jim, thanks for the info. Then for the FaceID do I put something like
| "Refresh" (using quotes), as the .Caption was for the tool tip when
hovering
| over the button?
| ... John
|
|
| "Jim Rech" wrote:
|
| If you want to see the caption instead of an icon you have to change the
| button's style:
|
| With Btn
| .Style = msoButtonCaption
|
|
| --
| Jim
| "JohnE" wrote in message
| ...
| | Hello. I'm using Excel 2003 and setting up several buttons. Rather
then
| a
| | picture, the users would prefer text on the button face. Here is a
sample
| of
| | setting the properties but I am not sure of how text is entered for
the
| | .FaceID. If anyone knows, please let me know.
| |
| | Set Btn = Tb.Controls.Add(Type:=msoControlButton)
| | With Btn
| | ' .FaceId =
| | .OnAction = "Refresh_Metric"
| | .Caption = "This will refresh existing workbook."
| | End With
| |
| | Thanks.
| | John
|
|
|




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

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