Save macro in template ?

D

David

I'm trying to save a macro in a template (.XLT) but when I
reopen the template its gone. I mean when I go into Tools--
Macro--Macros, I dont see it?

Can I do this? Sorry, I'm new to Excel.
I'm using Windows 2000 and Excel 2000

Can I run a macro in a template to test it, or do I have
to save to an XLS before running it. I'm confused.
 
B

beth

A good way to have all your macros accessible each time
you open excel is to save all your macros to a file called
personal.xls and put this in the following directory:
\Program Files\Microsoft Office\Office10\XLStart (I'm
running XP, so it might be slightly different in 2000.
Also, you might have to change the folder options to view
hidden folders and files to see this directory.)

When you open up excel, this file will open
automatically. Then, under the window menu, click hide.
This way, excel will open up a file each time with your
macros, but the fact that an additional file is open will
be transparent to you.

Hope this helps. I found this solution after trolling
around the microsoft website for a while.
 
D

David

Hi,
Thanks for this info but I'm not sure it will help as this
template (and macro I hope) will be shared by many people,
emailed to users etc.
On a side note, where are macros stored. I'm saving
templates with macros but when I reopen the template, the
macro is nowhere to be seen. Where do they go????
Are they saved IN the template or in some separate file
and if so how does the template know where to find them.
I'll be emailing this template to users and they must get
the macro with it.
Sorry for all the questions but the help files are useless.
- David
 
T

Tom Ogilvy

Open the template using File=>Open in Excel. This will open the template for
editing.

if you look at the caption in the blue bar at the top of the window, it
should show the name as

myfile.xlt

any changes you make should be saved in the template if you do a simple file
=> save.



if it shows something like myfile1.xls, then you have opened a new file
using the template as a template.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top