new to VBA

  • Thread starter Thread starter Mimmo
  • Start date Start date
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
 
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
 
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.
 
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.
 
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.
 
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.
 
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 *
 
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.
 
Back
Top