+ Reply to Thread
Results 1 to 2 of 2

VBA to check if current file is a Macro Enabled Template

  1. #1
    Forum Contributor
    Join Date
    06-29-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2016 (Office 365)
    Posts
    137

    VBA to check if current file is a Macro Enabled Template

    Hi There,

    Before a user runs a macro I would like to check that they have not opened the actual Template file, I tried using this:

    Please Login or Register  to view this content.
    but it does not work and I assume its because its only checking for a template and not a macro enabled template.

    Does anyone know the code I will need to check this prior to continuing with a macro?

    Cheers,
    Marcus

  2. #2
    Forum Contributor
    Join Date
    06-29-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2016 (Office 365)
    Posts
    137

    Re: VBA to check if current file is a Macro Enabled Template

    found it

    xlOpenXMLTemplateMacroEnabled

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro enabled file used as template
    By rajeev.raj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2019, 02:16 PM
  2. Save Template as Macro-Enabled
    By RosieW in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-08-2017, 10:34 PM
  3. Help with Macro enabled Template
    By stuartgb100 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2015, 02:30 AM
  4. Auto new folder and file from a macro enabled template
    By brisket in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2014, 12:52 AM
  5. [SOLVED] Why not always save a template file in the Macro-Enabled format?
    By alice2011 in forum Excel General
    Replies: 2
    Last Post: 01-17-2014, 06:15 AM
  6. Save a Macro Enabled Template to a custom location with a custom file name.
    By andcha in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-24-2013, 11:46 AM
  7. Custom File Name At Start-up Using Macro-Enabled Template Format (.XLTM) (VBA)
    By engineerchange in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-18-2012, 08:48 AM

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