+ Reply to Thread
Results 1 to 3 of 3

Close workbook without throwing message

  1. #1
    Registered User
    Join Date
    03-22-2011
    Location
    Orlando, Fl
    MS-Off Ver
    Excel 2007
    Posts
    15

    Close workbook without throwing message

    I have a workbook that I have disabled the ability to X out of it. The user must click a userform button to Exit.
    This same workbook also has a userform button that will save/close this workbook and open a different existing workbook.
    When that button is clicked, and the current workbook is being saved/closed it is throwing my "Please use the Exit button" message as if the user is Xing out of the workbook.
    How can I code to allow the current workbook to be saved/closed and open the new workbook without it thinking the user is Xing out when the button to save/close and open the new workbook is clicked and still block the abiility to X out of the workbook?

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    01-07-2022
    Location
    Europe
    MS-Off Ver
    Office 365
    Posts
    473

    Re: Close workbook without throwing message

    Can't really help without seeing your code. But a well placed
    Please Login or Register  to view this content.
    might be the solution
    <<< If you have valued anyone's contributions in this thread, please click * to thank them for their efforts

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Close workbook without throwing message

    Close Userform first when Before Save/Close Event.
    And UserForm_QueryClose code should allow to close/unload when CloseMode <> vbFormControlMenu.

+ 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. [SOLVED] Message box upon close but want code in Personal Workbook
    By davidrias in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2017, 11:35 AM
  2. [SOLVED] Message box on workbook close
    By zplugger in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-12-2015, 05:34 PM
  3. Opening a Workbook using a MsgBox, and opening another message box on close
    By Henk12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2015, 01:17 PM
  4. Close Active workbook after user acknowledges message box
    By jimrosser in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2013, 08:44 PM
  5. Message Box on Workbook Close
    By adam2308 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2011, 09:10 AM
  6. Close Word Document(and saving changes) without throwing a prompt.
    By tushar@excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2008, 11:26 AM
  7. eliminate message on workbook close
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-07-2007, 10:18 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