Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Custom toolbar with existing formatting buttons

Is there any way to install or create a custom toolbar with existing
formatting commandbar controls from an addin? I'd like to use those nice
AlignLefts, AlignRights, etc, right alongside the custom buttons of the
addin, along with their nearly unlimited undos and redos. Anyone got a
clue? I sure don't.

Tony Rizzo


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Custom toolbar with existing formatting buttons

Tony,

Each menu item or toolbar button has a unique identification number.
So if you know the ID number, a copy of that control can be added
to another command bar.
For example, the following snippet adds the "Sort" menu item (from the
Data menu) to a custom command bar called "Sort Options..."
'-------
With cmdNewControl
.Caption = "&Sort Options..."
.OnAction = ThisWorkbook.Name & "!DoMenuCheck"
Set cmdItem = .Controls.Add(ID:=928)
'-------

The following lists the button ID's for the two default toolbars...

Standard Toolbar...
&New 2520
Open 23
&Save 3
&Mail Recipient 3738
Print 2521
Print Pre&view 109
&Spelling 2
Cu&t 21
&Copy 19
&Paste 22
&Format Painter 108
&Undo 128
&Redo 129
Hyperl&ink 1576
&AutoSum 226
Paste Function 385
Sort &Ascending 210
Sort Des&cending 211
&Chart Wizard 436
&Drawing 204
&Zoom: 1733
Microsoft Excel &Help 984


Formatting Toolbar...
&Font: 1728
&Font Size: 1731
&Bold 113
&Italic 114
&Underline 115
&Align Left 120
&Center 122
&Align Right 121
&Merge and Center 402
&Text Direction 4027
Sheet Right to left 1925
&Currency Style 395
&Percent Style 396
&Comma Style 397
&Increase Decimal 398
&Decrease Decimal 399
&Decrease Indent 3162
&Increase Indent 3161
&Borders 203
&Fill Color 1691
&Font Color 401

'-------

Jim Cone
San Francisco, USA



"TonyRizzo" wrote in message
...
Is there any way to install or create a custom toolbar with existing
formatting commandbar controls from an addin? I'd like to use those nice
AlignLefts, AlignRights, etc, right alongside the custom buttons of the
addin, along with their nearly unlimited undos and redos. Anyone got a
clue? I sure don't.

Tony Rizzo


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
custom toolbar looses buttons when closed Charlie G Setting up and Configuration of Excel 2 July 21st 06 07:10 AM
Custom toolbar buttons Anauna Excel Programming 2 January 25th 06 05:31 PM
custom toolbar buttons are saved where? Excel loads twice bymistake and all my custom toolbar buttons get gone!!! Kevin Waite Excel Programming 2 March 3rd 04 03:31 PM
How to add images to custom toolbar buttons? RADO[_3_] Excel Programming 3 November 1st 03 05:07 PM
saving toolbar buttons on custom toolbar Paul James Excel Programming 12 August 6th 03 08:28 AM


All times are GMT +1. The time now is 03:48 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"