new to VBA

M

Mimmo

Just wrote my first VBA program now my question is: how do I save the code
so that it is available as a macro anytime I run Excel?
thanks
nick
 
J

John Wilson

Nick,

In order to have it available when you open Excel it'll have to
placed in your Personal.xls file.
Check the VBA Editor under the "Project" and see if it exists.
If not, go back to Excel and record a macro (any macro) and when
asked where to save it, choose "Personal.xls" (now you'll be able
to copy/move your macro into the Personal.xls).

For some more help with this, take a look here:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

John
 
M

Myrna Larson

Actually it doesn't have to be in a file named Personal.xls. It just has to be in an XLS file
that you save in your XLSTART folder so it is loaded every time Excel starts up.
 
J

John Wilson

Myrna,
Actually it doesn't have to be in a file named Personal.xls
Quite true. I guess the critical phrase in my reply was "have to be".
Better stated could have been "one easy way to do it would be".
I'll remember that in future posts.
Guess I was just looking at the "new to VBA" and didn't want to
complicate things.

John




Myrna Larson said:
Actually it doesn't have to be in a file named Personal.xls. It just has to be in an XLS file
that you save in your XLSTART folder so it is loaded every time Excel starts up.
 
W

Wild Bill

Myrna, that is a subtly useful idea. Since you mentioned it, I'm
inspired to split up my personal.xls, which over time bas built up to
dozens of subs and functions.

One side benefit is that I can shed the ones that are nothing but
"noise" to office colleagues (but that I myself could never part with
<g>), and pass around a concise version that they would easily
comprehend and thus find palatable.
 
M

Mimmo

thanks to all
Wild Bill said:
Myrna, that is a subtly useful idea. Since you mentioned it, I'm
inspired to split up my personal.xls, which over time bas built up to
dozens of subs and functions.

One side benefit is that I can shed the ones that are nothing but
"noise" to office colleagues (but that I myself could never part with
<g>), and pass around a concise version that they would easily
comprehend and thus find palatable.

Actually it doesn't have to be in a file named Personal.xls. It just has to be in an XLS file
that you save in your XLSTART folder so it is loaded every time Excel starts up.
 
R

Rob Bovey

Myrna Larson said:
Actually it doesn't have to be in a file named Personal.xls. It just has to be in an XLS file
that you save in your XLSTART folder so it is loaded every time Excel
starts up.

Hi Myrna,

There's one subtle difference between a hidden workbook named
personal.xls and one named anything else. If a hidden workbook in the
XLStart directory is named anything other than personal.xls, Excel will
start without automatically creating a new empty template workbook. Excel
recognizes the name "personal.xls" as a special case and it will create the
template workbook in addition to opening a workbook by this name from
XLStart.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 
J

John Wilson

Rob,

So my original post was only 99% wrong??? <vbg>

John

P.S. Apologies that I sent the first reply directly to you. Recently
switched
from Netscape to OE and still getting used to it.
 

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