+ Reply to Thread
Results 1 to 8 of 8

Adding macro into auto closing workbook

  1. #1
    Registered User
    Join Date
    11-18-2011
    Location
    Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Adding macro into auto closing workbook

    I´d like to add macro into autoclosing workbook.
    I have autoclosing workbook after certain time of inactivity and I´m not able to run automatically my macro before closing this workbook.
    Any ideas?
    thanx a lot

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Adding macro into auto closing workbook

    Hi Keepermokrad,

    In the "ThisWorkbook" VB module, you can create a BeforeClose event to do what you need.
    Please Login or Register  to view this content.

  3. #3
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Adding macro into auto closing workbook

    You can use the before close event:

    Please Login or Register  to view this content.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  4. #4
    Registered User
    Join Date
    11-18-2011
    Location
    Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Adding macro into auto closing workbook

    Quote Originally Posted by davegugg View Post
    You can use the before close event:

    Please Login or Register  to view this content.
    I have this one (macros name is skusocka)
    Please Login or Register  to view this content.
    Last edited by keepermokrad; 11-19-2011 at 06:02 AM.

  5. #5
    Registered User
    Join Date
    11-18-2011
    Location
    Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Adding macro into auto closing workbook

    macros name is "skusocka"

    Please Login or Register  to view this content.
    Last edited by keepermokrad; 11-19-2011 at 06:02 AM.

  6. #6
    Registered User
    Join Date
    11-18-2011
    Location
    Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Adding macro into auto closing workbook

    have added two ways , but not working neither

  7. #7
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Adding macro into auto closing workbook

    Post the code for Disable and skusocka.

  8. #8
    Registered User
    Join Date
    11-18-2011
    Location
    Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Adding macro into auto closing workbook

    I would like to add macro SKUSOCKA before macro on the bottom.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

+ 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