+ Reply to Thread
Results 1 to 2 of 2

Remove macros in xls file, but keep macros in xlt file

  1. #1
    Registered User
    Join Date
    04-06-2006
    Posts
    1

    Remove macros in xls file, but keep macros in xlt file

    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?

  2. #2
    Chris Marlow
    Guest

    RE: 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
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1