+ Reply to Thread
Results 1 to 3 of 3

Creating a Macro to save a copy before close

  1. #1
    Registered User
    Join Date
    02-01-2013
    Location
    Europe
    MS-Off Ver
    Excel 2003
    Posts
    2

    Creating a Macro to save a copy before close

    I am trying to create a macro to copy the current sheet and save it in a csv formatted version and insert such macro in a "before close" sub.

    I have managed to create the macro that creates the csv version successfully however it does not work when I insert it in the before close sub since it is creating a blank copy only.

    Below please find the macro to create the csv version:
    Please Login or Register  to view this content.

    Below please find the macro to create the csv version before closing:
    Please Login or Register  to view this content.
    Has anyone ever tried something similar and have any idea how to successfully execute the above mentioned macro before closing?
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Creating a Macro to save a copy before close

    Try this:

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: Creating a Macro to save a copy before close

    You will have to keep the macro in standard module and call it using a BeforeClose Event.

+ 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