Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How to permanently add a custom button?
I want to change my $ icon to use *my* preference of currency format
rather than "accounting". I created a new button and assigned a bit of code to it, and it worked great- until I closed that workbook and opened a new one. The icon is still there, but the code is not, so an error appears. How do I permanently add an icon? Or, how do I change the commands associated with an existing icon? Thanks for any assistance- I've been fussing over this for way too long! |
#2
|
|||
|
|||
The code is in the workbook you closed and that workbook should open when you
click on your button. Does it not? Can Excel find it? What is the error message? To have a macro available for all workbooks, store it in your Personal.xls in XLSTART folder or into an add-in which you load through ToolsAdd-ins. The Icon you added is stored with the Toolbars set-up in your *.XLB file. Apparently that saves properly since the Icon is showing up. Gord Dibben Excel MVP On 15 Mar 2005 07:44:54 -0800, wrote: I want to change my $ icon to use *my* preference of currency format rather than "accounting". I created a new button and assigned a bit of code to it, and it worked great- until I closed that workbook and opened a new one. The icon is still there, but the code is not, so an error appears. How do I permanently add an icon? Or, how do I change the commands associated with an existing icon? Thanks for any assistance- I've been fussing over this for way too long! |
#3
|
|||
|
|||
Gord- Thanks for your response. I'd like to make the code/button
available globally without opening a secondary file. I'm using Excel 2003; I searched for but could not locate a file called Personal.xls. Any recommendations? Thanks again for your help! |
#4
|
|||
|
|||
Personal.xls is created the first time you record a Macro using Macro
Recorder. ToolsMacroRecord New Macro. A dialog box will come up asking you name the macro and where to place it. Pick Personal Macro Workbook from the dropdown. Copy and paste a couple of cells then Stop Recording. You now have a Personal.xls in your Office\XLSTART folder. You can go to Visual Basic Editor(Alt+F11) to view the macro you just recorded in a Module. You can add more macros by recording or by typing/copying them into the Module. You can do a FileSave from there or better yet hit ALT + Q to return to the Excel window. Then with Personal.xls active, hit WindowHide. When you close Excel you will be asked if you want to save Personal.xls. Yes! It will open hidden next time you start Excel. NOTE: when assigning macros to buttons or menu items you will have to precede the macro name with Personal.xls. i.e. Personal.xls!macroname An alternative to Personal.xls is to create an add-in(*.xla) with your macros in it and load it through ToolsAdd-ins. The benefit of this is that you don't have to precede the macro name with the filename. A disadvantage is that you will not see the macros in the ToolsMacroMacros dialog. Gord On 16 Mar 2005 04:00:52 -0800, wrote: Gord- Thanks for your response. I'd like to make the code/button available globally without opening a secondary file. I'm using Excel 2003; I searched for but could not locate a file called Personal.xls. Any recommendations? Thanks again for your help! |
#6
|
|||
|
|||
Good to hear and thanks for the feedback.
Gord On 17 Mar 2005 06:40:01 -0800, wrote: Thanks for your help! Works like a charm. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I create my own custom button? | Excel Discussion (Misc queries) | |||
Command Button VBA code | Excel Discussion (Misc queries) | |||
Macro to simply bring up the Find dialogue box?? | Excel Discussion (Misc queries) | |||
Can I make a custom button in Excel for the Group feature? | Excel Worksheet Functions | |||
command button moves | Excel Discussion (Misc queries) |