+ Reply to Thread
Results 1 to 4 of 4

How can I completely close a specific workbook without closing other open workbooks?

  1. #1
    Registered User
    Join Date
    07-28-2020
    Location
    Ecuador
    MS-Off Ver
    2016
    Posts
    12

    How can I completely close a specific workbook without closing other open workbooks?

    Hi again guys!
    I hope you can help me this time too.

    I have a workbook where the user have to write a correct user & password (I made this using a form in VBA) before entering the workplace. But when the user open this workbook, it automatically close all the workbooks open before.

    So, how I can do for open my workbook wich has an access form without closing or hiding other workbooks?

    Note: Seems like the other workbooks don't close, but hide until the user put the correct data (user & password).

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: How can I completely close a specific workbook without closing other open workbooks?

    it sounds to me that whoever wrote the code you are running is shutting down the rest of the workbooks that are open. is that the case? can you post the code that you are running that is causing the problem? that would help out greatly.

  3. #3
    Registered User
    Join Date
    07-28-2020
    Location
    Ecuador
    MS-Off Ver
    2016
    Posts
    12

    Re: How can I completely close a specific workbook without closing other open workbooks?

    Hi, vba_php I send you the code:

    Private Sub Workbook_Activate()
    Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon"",False)"
    End Sub

    Private Sub workbook_open()
    Application.Visible = False
    Application.OnKey "^p", ""
    Application.OnKey "^x", ""
    uf_login.Show
    ActiveWindow.DisplayHeadings = False
    End Sub

  4. #4
    Registered User
    Join Date
    07-28-2020
    Location
    Ecuador
    MS-Off Ver
    2016
    Posts
    12

    Re: How can I completely close a specific workbook without closing other open workbooks?

    Quote Originally Posted by vba_php View Post
    it sounds to me that whoever wrote the code you are running is shutting down the rest of the workbooks that are open. is that the case? can you post the code that you are running that is causing the problem? that would help out greatly.
    Yeah, The code that I sent you in the private sub mode generate that problem. It makes all the workbooks initially opened, close automatically when the user write the correct data then enter to the workplace.
    Last edited by karlhyun94; 08-25-2020 at 09:05 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: 12-30-2019, 06:07 PM
  2. [SOLVED] workbook won't close when other workbooks are open
    By Jerbinator in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-11-2016, 08:21 AM
  3. [SOLVED] How can I completely close a specific workbook without closing other open workbooks
    By Sc0ut in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2016, 04:06 PM
  4. [SOLVED] Closing a Workbook from another workbook: Workbooks.close error: Subscript out of range
    By Coreyusa in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-14-2013, 06:45 PM
  5. [SOLVED] Open Multiple Workbooks, Record names, Copy paste to Active Workbook, Close the Workbooks
    By vba_madness in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2013, 06:09 AM
  6. [SOLVED] Edit code to close all workbooks except active workbook and other specific workbook
    By rocksan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-04-2012, 09:29 PM
  7. How to close specific workbook not all active workbooks?
    By Bon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-20-2006, 10:55 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