Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default How Do I Assign a Toolbar Button to a Custom Number Format I c

Try this

Selection.NumberFormat = "_(* #,##0.0_);_(* (#,##0.0);_(* "" - ""_);_(@_)"



--

Regards,

Peo Sjoblom


"FuadsCurse" wrote in message
...
Peo

Why is it choking on this line?

Selection.NumberFormat = "_(* #,##0.0_);_(* (#,##0.0);_(* " - "_);_(@_)"

Brett

"Peo Sjoblom" wrote:

Record a macro and save it to your personal.xls while applying the
format,
would look something similar to

Option Explicit

Sub Macro1()
Selection.NumberFormat = "$#,##0_);[Red]($#,##0)"
End Sub

now edit it a bit and add 2 lines

Option Explicit

Sub Macro1()
Application.DisplayAlerts = False
Selection.NumberFormat = "$#,##0_);[Red]($#,##0)"
Application.DisplayAlerts = False
End Sub

now attach it to a custom button


--

Regards,

Peo Sjoblom


"FuadsCurse" wrote in message
...
How do I assign a toolbar button to a custom number format I created?






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
how do I add phone number format as a permanent custom format? frustratedagain Excel Discussion (Misc queries) 3 February 4th 06 03:52 AM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Format a cell with a custom number format Armor Excel Worksheet Functions 4 January 29th 06 11:25 PM
custom number format benb Excel Discussion (Misc queries) 1 April 13th 05 12:21 AM
Stubborn toolbars in Excel 007 Excel Discussion (Misc queries) 9 December 11th 04 02:02 PM


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