+ Reply to Thread
Results 1 to 4 of 4

Removing macros on save

  1. #1
    Forum Contributor
    Join Date
    11-20-2008
    Location
    UK
    Posts
    132

    Removing macros on save

    I already have a workbook which we call a Job Sheet Generator. This is a macro enabled workbook and on it I have a button which when clicked triggers a macro which then saves it as a new workbook which is also macro enabled.

    What I need to do now though is have it so that the new workbook is not saved as a macro enabled one because the new workbook has to work online in a browser and in teams.

    The macro I was using was:

    Please Login or Register  to view this content.
    I've tried changing it to FileFormat:=51 and the extension to sTitle = Range("D1").Value & ".xlsx"

    But when I run it I still get a warning saying:

    The following features cannot be saved in macro-free workbooks

    VB Project

    Is there a way to keep the macros in the 'job sheet generator' but remove them from the workbook it saves?

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,815

    Re: Removing macros on save

    Please ignore.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Removing macros on save

    Change this
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and then use
    Please Login or Register  to view this content.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Removing macros on save

    Hi,
    A few guesses from me.
    Did you turn off your Application.DisplayAlerts = False and on again after saving?
    Second:
    I was reading about Save a Copy instead of Save As on this site:
    http://www.learnexcelmacro.com/wp/20...of-a-workbook/
    which also might be your problem.
    Third:
    I don't think any Macro's run while the file is on Teams, unless there is something new with Teams. Read:
    https://techcommunity.microsoft.com/...ams/m-p/292121
    Were you thinking the file would have the same function on Teams as it did on your own machine?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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. Replies: 1
    Last Post: 04-29-2016, 11:55 AM
  2. Removing Macros and out-of-workbook dependencies
    By DudeFromAccDept in forum Excel General
    Replies: 6
    Last Post: 03-28-2008, 05:15 AM
  3. Removing macros from workbook
    By Darrell in forum Excel General
    Replies: 1
    Last Post: 10-03-2005, 11:05 PM
  4. Removing embedded macros
    By Jim in forum Excel General
    Replies: 1
    Last Post: 08-23-2005, 02:05 PM
  5. removing unwanted macros...
    By melchizadek132 in forum Excel General
    Replies: 1
    Last Post: 06-16-2005, 09:05 PM
  6. [SOLVED] Problem Removing Disabled Macros
    By Dave Hall in forum Excel General
    Replies: 2
    Last Post: 02-18-2005, 10:06 AM
  7. Removing macros using VBA
    By ronin2307 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-07-2005, 11:16 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