Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default 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   Report Post  
Gord Dibben
 
Posts: n/a
Default

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   Report Post  
 
Posts: n/a
Default

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   Report Post  
Gord Dibben
 
Posts: n/a
Default

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!


  #5   Report Post  
 
Posts: n/a
Default

Thanks for your help! Works like a charm.



  #6   Report Post  
Gord Dibben
 
Posts: n/a
Default

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
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 create my own custom button? Lean IE Tom Excel Discussion (Misc queries) 1 March 8th 05 01:05 PM
Command Button VBA code Dave Peterson Excel Discussion (Misc queries) 2 January 25th 05 11:28 PM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 10:47 PM
Can I make a custom button in Excel for the Group feature? Lisa Excel Worksheet Functions 1 December 20th 04 09:34 PM
command button moves Stuart Excel Discussion (Misc queries) 2 December 15th 04 05:56 PM


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