Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with formatting right-click menu caption.


Hi all,

I'm not even sure this is possible, but if it is then I'm hoping
someone can give me the answer.

I've created a spreadsheet which has a dynamic right-click menu which
changes to show the breakdown of overall figures in specific cells in
my workbook.

A highly simplified example of the code used to add the caption is:


Code:
--------------------
Public Sub BuildMenu()

Dim objCmdBarCtrl As CommandBarControl
Dim objCmdButton As CommandBarButton

Set objCmdBarCtrl = Application.CommandBars("Cell").Controls.Add _
(Type:=msoControlPopup, Befo=1)
objCmdBarCtrl.Caption = "Figures for December 2005"
objCmdBarCtrl.Tag = "Scorecard"

Set objCmdButton = objCmdBarCtrl.Controls.Add
objCmdButton.Caption = "Specialism - 18 / Target - 15"

End Sub
--------------------



What I'd like to be able to do is show the figures (18 and 15) in bold
on the menu and possibly have the 18 figure in red if it's under the
target and green if it's over target.

Forgot to add in my original post that I'm using Excel 2002.

Any help would be greatly appreciated & many thanks in advance.

I've also posted this question on the MrExcel message board & will let
both forums know if I get an answer ('cos I'm a good bunny like that):
http://www.mrexcel.com/board2/viewtopic.php?t=200454

Delmar


--
Delmar D'Percy
------------------------------------------------------------------------
Delmar D'Percy's Profile: http://www.excelforum.com/member.php...o&userid=32438
View this thread: http://www.excelforum.com/showthread...hreadid=522111

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Help with formatting right-click menu caption.

Delmar,
You can make the text upper/lower case and you can add/change the FaceID of the button.
You cannot make the text bold or specify the color of the button text.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Delmar D'Percy"
wrote in message...
Hi all,
I'm not even sure this is possible, but if it is then I'm hoping
someone can give me the answer.
I've created a spreadsheet which has a dynamic right-click menu which
changes to show the breakdown of overall figures in specific cells in
my workbook.
A highly simplified example of the code used to add the caption is:
Code:
--------------------
Public Sub BuildMenu()

Dim objCmdBarCtrl As CommandBarControl
Dim objCmdButton As CommandBarButton

Set objCmdBarCtrl = Application.CommandBars("Cell").Controls.Add _
(Type:=msoControlPopup, Befo=1)
objCmdBarCtrl.Caption = "Figures for December 2005"
objCmdBarCtrl.Tag = "Scorecard"

Set objCmdButton = objCmdBarCtrl.Controls.Add
objCmdButton.Caption = "Specialism - 18 / Target - 15"

End Sub
--------------------

What I'd like to be able to do is show the figures (18 and 15) in bold
on the menu and possibly have the 18 figure in red if it's under the
target and green if it's over target.
Forgot to add in my original post that I'm using Excel 2002.
Any help would be greatly appreciated & many thanks in advance.
I've also posted this question on the MrExcel message board & will let
both forums know if I get an answer ('cos I'm a good bunny like that):
http://www.mrexcel.com/board2/viewtopic.php?t=200454
Delmar
Delmar D'Percy

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with formatting right-click menu caption.


Thanks for the confirmation Jim.

I was hoping that something could be done as the colours are changed
when an option is disabled (i.e. greyed out).

Maybe if I learn how to use the API I might find an answer or a
workaround. If I do, I'll be shouting it from the rooftops! :)


--
Delmar D'Percy
------------------------------------------------------------------------
Delmar D'Percy's Profile: http://www.excelforum.com/member.php...o&userid=32438
View this thread: http://www.excelforum.com/showthread...hreadid=522111

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
Selective formatting of text on Label caption Myles[_47_] Excel Programming 0 February 10th 06 03:32 AM
Right click menu Mats.Bergstrand Excel Programming 0 December 17th 05 10:33 AM
User Form Caption controls beyond formatting Vacation's Over Excel Programming 1 November 1st 05 02:10 PM
Adding a menu item right click menu when clicking on a single. Andoni[_28_] Excel Programming 0 September 2nd 04 10:23 PM
Adding menu to the mouse right click pop-up menu Jack Excel Programming 1 February 12th 04 05:23 AM


All times are GMT +1. The time now is 05:40 PM.

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"