style button
Lots of people have a workbook named personal.xls that's stored in their XLStart
folder.
This file is usually hidden from you when you're working in excel, but all of
the macros stored in that workbook's project will be available to you.
So you could create a macro that would apply the custom numberformat you want
and save it in your personal.xls workbook.
Then you could modify the toolbar
Tools|Customize|commands tab|Macros category
Drag the custom button icon to the standard toolbar where you want it.
As long as that tools|customize dialog is visible, you can change stuff
associated with that new icon--including the macro that it calls--and the face
of the icon.
Change the face (and Name) to what you want.
And assign the macro in your personal.xls workbook to this icon.
This may be what your macro could look like:
Option Explicit
Sub SpecialFormat()
On Error Resume Next
Selection.NumberFormat = "$#,##0.00"
If Err.Number < 0 Then
Beep
Err.Clear
End If
On Error GoTo 0
End Sub
BorisS wrote:
I need a button installed on my standard toolbar, which will have behind it a
custom format/style (just as comma/percent/dollar do). Any help?
--
Boris
--
Dave Peterson
|