+ Reply to Thread
Results 1 to 11 of 11

Suppress "project unviewable" messagebox on close

  1. #1
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Suppress "project unviewable" messagebox on close

    Hi All,

    I am trying to close out of a shared workbook and close excel. I would like to keep my workbook shared as a group of 4 or more may access it at the same time. After all my saving has been complete, I close out with the following snippet.

    Please Login or Register  to view this content.
    All seems to work fine, but at the end of it all I see the message box :

    pl.JPG

    and

    a box wanting to restart Excel.

    rs.JPG

    Other than not having a shared workbook, is there any fixes to suppress these?


    Thank you,
    Patrick

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Suppress "project unviewable" messagebox on close

    Quit after you close.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Suppress "project unviewable" messagebox on close

    Thank you for the help.

    After rearranging the code, the error stopped.

    I am still trying to get a full close on Excel. I don't see anything in the project browser hanging around. Any ideas on getting this window to close in the code?

    Capture.PNG


    Patrick

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Suppress "project unviewable" messagebox on close

    That's not happened to me - do you have screen updating turned off

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Suppress "project unviewable" messagebox on close

    What's your code now?
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Suppress "project unviewable" messagebox on close

    I looked back through the code and didn't see anywhere I left the screen updating set to false.

    The code below is where I am calling various subs.
    Please Login or Register  to view this content.
    And here is my closing sub that is leaving the empty excel window open.

    Please Login or Register  to view this content.
    Any ideas on why the screen doesn't shut down?


    Patrick

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Suppress "project unviewable" messagebox on close

    Is wb1 or wb2 the workbook containing the code?

  8. #8
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Suppress "project unviewable" messagebox on close

    wb1 is where I have most of my code. Some code in modules, some on sheet, some in a userform.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Suppress "project unviewable" messagebox on close

    So if you close wb1, the workbook that contains that code, how are the next two lines going to execute?

  10. #10
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Suppress "project unviewable" messagebox on close

    Yep, seems kinda pointless.

    So, I have been messing around with the code a bit. Looking for other clues online but have yet to get the result I am looking for. If I leave the workbook un-shared everything seems to work without an issue. When the workbook is shared (desired situation), the code runs and leaves me with the situation in post #1.

    Perhaps something is hanging up I can't see. The project opens 2 workbooks. The main workbook is shared and the other not. Not rightly sure why that should make a difference when quitting the application.


    Patrick

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Suppress "project unviewable" messagebox on close

    My point is, the workbook running the code should close all other workbooks first, save itself, then quit the application. It can't close itself and then quit the application.
    Last edited by shg; 11-15-2017 at 03:16 PM.

+ 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. Replies: 2
    Last Post: 01-15-2015, 04:45 PM
  2. TO KNOW THE PROJECT STATUS IF "ONTIME" OR "DELAY" - as attached sheet
    By javaidmr in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-02-2014, 07:39 PM
  3. Create a Command Button to "Save As" and "Close" an Excel Workbook
    By thedunna in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-26-2013, 05:38 PM
  4. Excel 2007 VBA...suppress "opening" message when refreshing pivot data
    By dbiggied in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-22-2012, 10:44 AM
  5. Validation on clicking "Cancel" on messagebox.
    By excelit in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-02-2011, 08:32 AM
  6. "Project is unviewable" when closing a shared workbook
    By JoshP in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2007, 12:57 PM
  7. Excel Sort Macro is just giving me a "400" messagebox!
    By gausie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-26-2007, 06:32 AM

Tags for this Thread

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