Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Face ID on main menu?

Hi,

I have the following code:

Set myCustMenu = cbWSMenuBar.Controls.Add(Type:=msoControlButton,
befo=iHelpIndex, Temporary:=True)
With myCustMenu
.Style = msoButtonCaption
.Caption = "Test"
.FaceId = 247
.OnAction = "TryME"
End With

The menu bar is not displaying the face ID. Is it not possible to have
a face ID n a menubar button on the main menu?

if i have a sub menu control button on a popup menu it works.

any idea?

thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default Face ID on main menu?

Change msoButtonCaption to msoButtonIconAndCaption or to msoButtonIcon if you
only want to display the icon. Alternatively, don't specify the Style as it
defaults to msoButtonIcon. This worked for me:-

Sub Test()
Dim iHelpIndex As Integer
Dim myCustMenu As CommandBarButton
With Application.CommandBars(1)
iHelpIndex = .Controls("Help").Index
Set myCustMenu = .Controls.Add(Type:=msoControlButton, _
befo=iHelpIndex, Temporary:=True)
End With
With myCustMenu
.Style = msoButtonIconAndCaption 'msoButtonCaption
.Caption = "Test"
.FaceId = 247
.OnAction = "TryME"
End With
End Sub

Sub TryMe()
MsgBox "Try me !!!"
End Sub

Regards,
Greg

" wrote:

Hi,

I have the following code:

Set myCustMenu = cbWSMenuBar.Controls.Add(Type:=msoControlButton,
befo=iHelpIndex, Temporary:=True)
With myCustMenu
.Style = msoButtonCaption
.Caption = "Test"
.FaceId = 247
.OnAction = "TryME"
End With

The menu bar is not displaying the face ID. Is it not possible to have
a face ID n a menubar button on the main menu?

if i have a sub menu control button on a popup menu it works.

any idea?

thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Face ID on main menu?

It works fine now.

Thanks

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
Unhide Main Menu Bar Dkline Excel Worksheet Functions 2 February 2nd 07 09:31 PM
How can I show the name of the file on top of the Main Menu Bar Humberto New Users to Excel 2 May 2nd 06 03:34 PM
Main menu is missing Deb G Excel Discussion (Misc queries) 3 May 10th 05 07:46 PM
J-walk face id menu - Problem Madiya Excel Programming 3 August 21st 04 11:19 AM
New Main menu item Cynthia[_4_] Excel Programming 7 May 9th 04 12:35 AM


All times are GMT +1. The time now is 03:15 PM.

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"