+ Reply to Thread
Results 1 to 6 of 6

On close yes/no message box

  1. #1
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    On close yes/no message box

    Morning guys,

    A bit of a confused question...

    I want to run a procedure with before_close, the procedure is to bring up a yes/no message box. If the user selects yes, a sub procedure must run, save and then close, if no is selected, the book must just close.

    Any help please?
    Last edited by Jacques Grobler; 09-19-2011 at 08:55 AM.
    Jacques


  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: On close yes/no message box

    Use a Public Boolean to determine if the procedure has been run.
    Attached Files Attached Files
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    Re: On close yes/no message box

    Hi Roy,

    If I select yes, I get a "Hello world", all well, however, when I select no, I get the same message, I then need to select no again, or I can select yes. Why is this?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: On close yes/no message box

    Sorry I was rushing out to work this morning . Replace the close event code with this
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    Re: On close yes/no message box

    Perfect! Thanks Roy, appreciate the help.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: On close yes/no message box

    No problem. Don't forget to mark solved

+ 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