Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ken G.
 
Posts: n/a
Default Custom number format button

I'd like to create a toolbar button linked to a custom number format so that
clicking on the button would re-format the active cell or range to my custom
format.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default Custom number format button

Hi Ken,

Alt-F11 to enter the VBE
Insert | Module
Paste the following code:

'===========
Public Sub aTester()
Selection.NumberFormat = "#,##0_);[Red](#,##0)"
End Sub
'<<===========

Alt=F11 to return to Excel

View | Toolbars | Customize | Select 'Commands' tab
Select 'Macros' in the left-hand Categories window
Drag the smiley icon ftom the commands window to your toolbar
Right-click the smiley | Assign Macro
Enter (or select) the name of your macro
OK | Close

Change the macro's number format to your required format.

Change the macro name to suit.

---
Regards,
Norman



"Ken G." wrote in message
...
I'd like to create a toolbar button linked to a custom number format so
that
clicking on the button would re-format the active cell or range to my
custom
format.



  #3   Report Post  
Posted to microsoft.public.excel.misc
Ken G.
 
Posts: n/a
Default Custom number format button

Thanks Norman - exactly what I wanted. Can the smiley button be edited or
replaced?

"Norman Jones" wrote:

Hi Ken,

Alt-F11 to enter the VBE
Insert | Module
Paste the following code:

'===========
Public Sub aTester()
Selection.NumberFormat = "#,##0_);[Red](#,##0)"
End Sub
'<<===========

Alt=F11 to return to Excel

View | Toolbars | Customize | Select 'Commands' tab
Select 'Macros' in the left-hand Categories window
Drag the smiley icon ftom the commands window to your toolbar
Right-click the smiley | Assign Macro
Enter (or select) the name of your macro
OK | Close

Change the macro's number format to your required format.

Change the macro name to suit.

---
Regards,
Norman



"Ken G." wrote in message
...
I'd like to create a toolbar button linked to a custom number format so
that
clicking on the button would re-format the active cell or range to my
custom
format.




  #4   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default Custom number format button

Hi Ken,

Can the smiley button be edited or replaced?


Right-click the smiley | Customize | Right-click the smiley |
'Change button image' | Select desired icon | Close

---
Regards,
Norman



"Ken G." wrote in message
...
Thanks Norman - exactly what I wanted. Can the smiley button be edited or
replaced?

"Norman Jones" wrote:

Hi Ken,

Alt-F11 to enter the VBE
Insert | Module
Paste the following code:

'===========
Public Sub aTester()
Selection.NumberFormat = "#,##0_);[Red](#,##0)"
End Sub
'<<===========

Alt=F11 to return to Excel

View | Toolbars | Customize | Select 'Commands' tab
Select 'Macros' in the left-hand Categories window
Drag the smiley icon ftom the commands window to your toolbar
Right-click the smiley | Assign Macro
Enter (or select) the name of your macro
OK | Close

Change the macro's number format to your required format.

Change the macro name to suit.

---
Regards,
Norman



"Ken G." wrote in message
...
I'd like to create a toolbar button linked to a custom number format so
that
clicking on the button would re-format the active cell or range to my
custom
format.






  #5   Report Post  
Posted to microsoft.public.excel.misc
Ken G.
 
Posts: n/a
Default Custom number format button

Thanks again. I now remember doing this years ago but havn't had the need to
do it since.

"Norman Jones" wrote:

Hi Ken,

Can the smiley button be edited or replaced?


Right-click the smiley | Customize | Right-click the smiley |
'Change button image' | Select desired icon | Close

---
Regards,
Norman



"Ken G." wrote in message
...
Thanks Norman - exactly what I wanted. Can the smiley button be edited or
replaced?

"Norman Jones" wrote:

Hi Ken,

Alt-F11 to enter the VBE
Insert | Module
Paste the following code:

'===========
Public Sub aTester()
Selection.NumberFormat = "#,##0_);[Red](#,##0)"
End Sub
'<<===========

Alt=F11 to return to Excel

View | Toolbars | Customize | Select 'Commands' tab
Select 'Macros' in the left-hand Categories window
Drag the smiley icon ftom the commands window to your toolbar
Right-click the smiley | Assign Macro
Enter (or select) the name of your macro
OK | Close

Change the macro's number format to your required format.

Change the macro name to suit.

---
Regards,
Norman



"Ken G." wrote in message
...
I'd like to create a toolbar button linked to a custom number format so
that
clicking on the button would re-format the active cell or range to my
custom
format.






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
number format Ivan Excel Discussion (Misc queries) 2 October 14th 05 02:08 PM
change custom format number to text joey Excel Discussion (Misc queries) 3 September 20th 05 09:35 PM
Linking customer number format to a cell Bobak Excel Discussion (Misc queries) 2 August 8th 05 08:09 PM
Convert [h]:mm sum total format to number format Guy Excel Worksheet Functions 1 August 5th 05 05:56 AM
Format Number to Text Roni Excel Worksheet Functions 2 May 17th 05 03:17 PM


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