Closed Thread
Results 1 to 2 of 2

vba excel - hiding of an Application and closing different workbooks

  1. #1
    Forum Contributor
    Join Date
    02-25-2013
    Location
    Colorado, US
    MS-Off Ver
    Microsoft 365 Apps
    Posts
    518

    vba excel - hiding of an Application and closing different workbooks

    Can someone please help me with this? I've tried to test this and can't seem to isolate the problem. The
    Workbook1 application window is hidden upon opening (what I mean by this is that the entire Excel application window is hidden from view) using:

    Application.Visible = False
    UserForm1.Show


    If I open other Excel applications, and close any of them using the big red x, it closes the application holding UserForm1.

    So I tried:

    ActiveWindow.Visible = False
    UserForm1.Show


    This creates a different problem. The Excel application window is still visible, but the Workbook1 window becomes hidden. VBA throws an error activating UserForm1 saying that the global focus cannot be set.

    I've tried
    Windows(ThisWorkbook.Name).Visible = False

    This still leaves the application window visible (Workbook hidden) and throws an error upon UserForm1.Show
    I know I can probably use something like
    Please Login or Register  to view this content.
    That still wouldn't address the issue of hiding the application window though when UserForm1 is open. Is there a sub to keep the Workbook1 from closing if other workbooks are commanded to close?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: vba excel - hiding of an Application and closing different workbooks

    Closed at the request of terriertrip to open in Commercial Services.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Hiding Application or a Worksheet takes away the ability to use Application properties
    By tfurnivall in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-01-2016, 05:44 PM
  2. Excel Crashes When Closing Certain Workbooks
    By billtreloar in forum Excel General
    Replies: 24
    Last Post: 08-06-2016, 01:49 PM
  3. [SOLVED] Excel application not closing
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-02-2014, 05:50 AM
  4. Macro to autoclose hidden workbooks is closing all active workbooks
    By tlchavez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2013, 06:38 PM
  5. close workbooks without closing excel ?
    By Clute in forum Excel General
    Replies: 2
    Last Post: 08-05-2006, 04:50 PM
  6. [SOLVED] Ensure Workbooks in the same Excel Application
    By Andy B via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2005, 12:10 PM
  7. Closing Excel Application
    By Inthi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2005, 08:05 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