+ Reply to Thread
Results 1 to 4 of 4

macro - workbook on close issue

  1. #1
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    macro - workbook on close issue

    hello

    1)i have a userform that has a command "save/close"
    2)in "this workbook" before close, i have asked a timer (macro to be run on a particular) day to popup to remind the user to click on the userform button

    problem
    it works fine, however, when i click on "save/close" on the userform, .....before the file closes, the msgbox or reminder shows up!

    is there a way to stop that from happening, if i select "Save/close"? i realize i have set the settings to, before close msg box, but can anyone help! ive been stuck on this

    below is my code, BEFORE CLOSE

    Please Login or Register  to view this content.
    .....below is my code for "user form"

    Please Login or Register  to view this content.
    im new with vba so i would really appreciate it if i can get some feedback, thx you. happy new year to all!

  2. #2
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: macro - workbook on close issue

    basically,

    if someone can help me with an "if" statement taht.....if i press "save/close" then do not run the msg box before close....how can i intrigrate that into the code below...pls help

    Please Login or Register  to view this content.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: macro - workbook on close issue

    Turn off macro events to suppress other macros from triggering:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: macro - workbook on close issue

    Thxs J.B.

    that resolved my issue, however it prompted another problem. please see code below

    Please Login or Register  to view this content.
    when i select "yes" from my msg box.....it DOES take me to my sheet, however ....it then prompts or ask me if i would like to save the file....if i say yse, it closes, and if i say no, it still closes.....if i say cancel, then it doesnt do anything......is there a reason why...can someone kindly help!!!
    Last edited by jw01; 01-06-2011 at 02:46 AM.

+ 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