View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chris Marlow Chris Marlow is offline
external usenet poster
 
Posts: 74
Default Remove macros in xls file, but keep macros in xlt file

Hi,

You could put your macros in another workbook (preferably XLA) that your XLT
refers to. Your macros would have to cope with the fact that they be executed
on a workbook other than the one they are in.

Although generally this is fairly straightforward, if you have a lot of
recorded macros (in my experience) it could take an amount of reworking to
get the code to work as you expect.

Regards,

Chris.

--
Chris Marlow
MCSD.NET, Microsoft Office XP Master


"nulad" wrote:


I have a "Master" Excel template ".xlt" that contains macros to create,
format and protect a new worksheet.

After the "Master" "xlt" file is opened, and used to create, format,
and protect a worksheet, the macros are no longer needed or wanted in
the new "xls" file (but the macros are still wanted and needed in the
"Master" "xlt" file). How do you save the resulting "xls" file,
keeping the formatting and worksheet protection, without the "Master"
template's macros?

Is there a macro that can be created, that will not save the macros in
the "xls" file, but will keep the macros in the "Master" template "xlt"
file?


--
nulad
------------------------------------------------------------------------
nulad's Profile: http://www.excelforum.com/member.php...o&userid=33248
View this thread: http://www.excelforum.com/showthread...hreadid=530713