Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default CommandBar Controls

I have built menus and toolbars for my excel apps so I am familiar with
creating and setting up controls and buttons for commandbars. Now I am trying
to assign a FaceId to an msoControlButton, however this is not working. I can
assign FaceId's to buttons that I create, but not to standard ones like 'Save
As'

When I manually customize a toolbar I can add a control such as 'Save As',
then change it to default style, then select from one of the pictures. When I
try to record this in a macro I do not get any code for the FaceId change.

Ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default CommandBar Controls

I don't know about recording a macro but I have no problem changing the face
id of a built-in control:

Commandbars("Standard").Controls("New").FaceId=123

Did I misunderstand the problem?
--
Jim Rech
Excel MVP

"Simon Shaw" wrote in message
...
|I have built menus and toolbars for my excel apps so I am familiar with
| creating and setting up controls and buttons for commandbars. Now I am
trying
| to assign a FaceId to an msoControlButton, however this is not working. I
can
| assign FaceId's to buttons that I create, but not to standard ones like
'Save
| As'
|
| When I manually customize a toolbar I can add a control such as 'Save As',
| then change it to default style, then select from one of the pictures.
When I
| try to record this in a macro I do not get any code for the FaceId change.
|
| Ideas?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default CommandBar Controls

after typing the dot after controls("New") I did not see FaceId in the drop
down. I looked at other code I had, and I had used it there so I was confused
why. Just thought I was missing something.

thanks

Simon

"Jim Rech" wrote:

I don't know about recording a macro but I have no problem changing the face
id of a built-in control:

Commandbars("Standard").Controls("New").FaceId=123

Did I misunderstand the problem?
--
Jim Rech
Excel MVP

"Simon Shaw" wrote in message
...
|I have built menus and toolbars for my excel apps so I am familiar with
| creating and setting up controls and buttons for commandbars. Now I am
trying
| to assign a FaceId to an msoControlButton, however this is not working. I
can
| assign FaceId's to buttons that I create, but not to standard ones like
'Save
| As'
|
| When I manually customize a toolbar I can add a control such as 'Save As',
| then change it to default style, then select from one of the pictures.
When I
| try to record this in a macro I do not get any code for the FaceId change.
|
| Ideas?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default CommandBar Controls

Simon

It depends on how you reference the control. This:

Application.CommandBars(1).Controls("New")

will not bring up the FaceId because it's referencing the CommandBarControls
collection. That collection can contain different types of controls some of
which do not have the FaceID property. However, if you know that the
control your referencing has a FaceID property, you can use it anyway (as
Jim pointed out).

Dim cb as CommandBarButton
Dim cc as CommandBarControl

cb.FaceID = 123
cc.FaceID = 123

Since cb only references one type of control (that uses FaceID), FaceID will
show up on the popup. On the other hand cc won't show FaceID because it
could be any type of control.

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

Simon Shaw wrote:
after typing the dot after controls("New") I did not see FaceId in
the drop down. I looked at other code I had, and I had used it there
so I was confused why. Just thought I was missing something.

thanks

Simon

"Jim Rech" wrote:

I don't know about recording a macro but I have no problem changing
the face id of a built-in control:

Commandbars("Standard").Controls("New").FaceId=123

Did I misunderstand the problem?
--
Jim Rech
Excel MVP

"Simon Shaw" wrote in message
...
I have built menus and toolbars for my excel apps so I am familiar
with creating and setting up controls and buttons for commandbars.
Now I am trying to assign a FaceId to an msoControlButton, however
this is not working. I can assign FaceId's to buttons that I
create, but not to standard ones like 'Save As'

When I manually customize a toolbar I can add a control such as
'Save As', then change it to default style, then select from one of
the pictures. When I try to record this in a macro I do not get any
code for the FaceId change.

Ideas?



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
ActiveX Controls vs Form Controls Alex Excel Discussion (Misc queries) 1 January 11th 06 08:46 AM
Commandbar frustration. Julian Cox Excel Programming 6 July 23rd 04 08:57 PM
commandbar Greg Prost[_2_] Excel Programming 2 November 21st 03 11:42 AM
commandbar hunt defj Excel Programming 2 November 17th 03 11:40 PM
Moving CommandBar using VBA or C# Aaron Queenan Excel Programming 1 October 31st 03 03:20 PM


All times are GMT +1. The time now is 05:33 AM.

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

About Us

"It's about Microsoft Excel"