View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.newusers
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default Simple way to enable just my personal macros in Excel (& Office) 2007

Hi

type Alt+F11 to open the VBE
In the Immediate window type
?application.StartupPath

For me it returns
C:\Documents and Settings\Roger Govier\Application
Data\Microsoft\Excel\XLSTART

The file containing your macros will be called Personal.xls unless you
have renamed it to something else.

In my case, I don't have my personal.xls for 2003 or my personal.xlsb
stored there, and I have used registry settings to tell where Excel to
find them. If you do not have any success with finding your file and
want to go this route,come back again and I will furnish more details.

--
Regards

Roger Govier


"LurfysMa" wrote in message
...
On Mon, 11 Jun 2007 09:05:53 +0200, Jan Karel Pieterse
wrote:

Hi LurfysMa,

How do I know which folder my VBA macros are in? It's not like a VB
project. I just do Alt+F11.


In Excel, VBA code is a part of a workbook.
Excel has a special workbook called "Personal macro workbook", with a
filename of Personal.xls (or in Excel 2007 personal.xlsb). This
workbook is hidden from the user interface and is stored in a folder
called:

C:\Documents and settings\YourUserName\Application
Data\Microsoft\Excel\XLSTART\


There is no such folder.

I did a Search (with hidden files included). It returned only:

C:\Documents and Settings\Administrator\Recent

Using Explorer (with hidden files viewed), I found:

C:\Documents and settings\Administrator
\Application Data\Microsoft\Excel\XLSTART\

The folder is empty. Not sure why it didn't appear in the Search
results.

No other \Excel\XLSTART found.

Puzzling...

What's the name of the file containing the macros?



--