+ Reply to Thread
Results 1 to 5 of 5

HIDDEN WORKBOOK? Excel Workbook Closes after Userform Submits

  1. #1
    Registered User
    Join Date
    07-05-2019
    Location
    Louisiana
    MS-Off Ver
    2016
    Posts
    3

    HIDDEN WORKBOOK? Excel Workbook Closes after Userform Submits

    Hi All,

    I have built this elaborate "software" using VBA and have encountered this one nuisance that I don't know how to fix. I have a HomePage userform that is a hub and serves as the gateway to other userforms or to Excel worksheets. After opening Userform1 from the Homepage and submitting it through a command button click, Userform1 does its thing and I return back to the Homepage. WONDERFUL...but when I click on a command button on the userform to go to Excel (which I can see behind the HomePage Userform), THE WORKBOOK DISAPPEARS!!!

    I don't know what code to put here because I don't know where the problem is occurring. But, I have checked the "ThisWorkbook" codes, and the commandbutton codes on the Homepage and I don't know if it is because I broke the cardinal rule of "no selects and activates". Nonetheless, here is a sample vba from the Homepage userform to the Excel sheet.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Can someone tell me what I may have typed and where it could be so I can delete it?

    Thanks!

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: HIDDEN WORKBOOK? Excel Workbook Closes after Userform Submits

    Hi and welcome.

    I think this would be a little easier to diagnose if we could see it in context.

    Would it be possible for you to attach your workbook? Desentize the data if necessary.

    BSB

  3. #3
    Registered User
    Join Date
    07-05-2019
    Location
    Louisiana
    MS-Off Ver
    2016
    Posts
    3

    Re: HIDDEN WORKBOOK? Excel Workbook Closes after Userform Submits

    Hi BSB,

    I can't attach it. It is too large and I'm not sure what to delete to make it attachable but still function. Is there a way that I can send it to you alternatively?


    Thanks,
    Marsha

  4. #4
    Registered User
    Join Date
    07-05-2019
    Location
    Louisiana
    MS-Off Ver
    2016
    Posts
    3

    Re: HIDDEN WORKBOOK? Excel Workbook Closes after Userform Submits

    Also, how do I make the excel program work without the VBA center operating and available? For example, every time I open the program, the VBA center opens too. On another computer that does not have the developer tab or anything, it will still open if there is a bug in the code. And, to the problem that I posted about, it makes it impossible for the user to continue using it when there is nothing on the screen but Excel says the "reopening the workbook will lose any changes".

    It makes it really scary for the user.

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: HIDDEN WORKBOOK? Excel Workbook Closes after Userform Submits

    If by the "VBA Center" you mean the VB Editor then it is part and parcel of Excel and you cannot separate the two.

    If the code in the tool you've built is bug free and error handled appropriately then the end user should never see the VBE.

    BSB

+ 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] Workbook.Close closes the wrong Workbook?
    By bsabiston in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2019, 01:11 PM
  2. [SOLVED] Code closes all but active workbook, also closes personal...
    By fourmurphys in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-24-2016, 03:43 PM
  3. [SOLVED] Userform unload Me closes workbook
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-29-2016, 10:49 AM
  4. [SOLVED] VBA to open new workbook and run macro from new workbook, which closes old workbook
    By Rerock in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-26-2014, 10:45 AM
  5. Replies: 2
    Last Post: 04-14-2013, 05:27 AM
  6. User Form that submits data to a network Workbook
    By nicholnr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-07-2012, 12:16 PM
  7. Workbook closes but excel doesn't
    By jamer02 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-21-2011, 09:17 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