+ Reply to Thread
Results 1 to 6 of 6

VBA \ Macros \ Forms \ Workbook \ Workbook makes visible itself

  1. #1
    Registered User
    Join Date
    10-25-2017
    Location
    mmmm
    MS-Off Ver
    2016
    Posts
    15

    VBA \ Macros \ Forms \ Workbook \ Workbook makes visible itself

    This is my code for the Workbook:
    Please Login or Register  to view this content.
    I've got a userform with a button. This button shows another userform with another button:

    -Userform2
    Please Login or Register  to view this content.
    Now in this second userform, got another button that clicking on it, creates a new workbook, saves it and closes it:

    -Userform1
    Please Login or Register  to view this content.
    As you can see in the Open Workbook sub, I've got the Application.Visible = False, so when I run the file, it wont show me the current worksheets nor the workbook, just the userforms created.

    Everything works, but at the end of the sub for the new workbook, the current workbook makes itself visible. Let's say the workbook's name for the application created it's called "BOOK.xlsm" (where I have my VBA code), so when I run the app, the workbook "BOOK.xlsm" doesn't show. So far so good. When I run the macro (click button) to create, save as, and close a new workbook and finishes (that works correctly), the workbook "BOOK.xlsm" shows up behind the forms of the application aaaaand that's what I dont want to happen. I want to be able to finish the macro, and let the forms right there, with the "BOOK.xlsm" not showing up, just the userforms as it should be.


    What can I do?
    Last edited by Francisco Vargas; 10-25-2017 at 05:52 PM.

  2. #2
    Registered User
    Join Date
    02-14-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2010, Excel 2016, Office365
    Posts
    5

    Re: VBA \ Macros \ Forms \ Workbook \ Workbook makes visible itself

    Everything works, but at the end of the sub for the new workbook, the current workbook makes itself visible.
    Is it visible and it doesn't close, or its visible because you visually see the application switch screens to the new excel workbook before closing?

  3. #3
    Registered User
    Join Date
    02-14-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2010, Excel 2016, Office365
    Posts
    5

    Re: VBA \ Macros \ Forms \ Workbook \ Workbook makes visible itself

    Ok. Quick easy fix..

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-25-2017
    Location
    mmmm
    MS-Off Ver
    2016
    Posts
    15

    Re: VBA \ Macros \ Forms \ Workbook \ Workbook makes visible itself

    I visuallly see it, it keeps popping in front of my userforms, if I try to close it, I close the entire application.
    I just want this to work as a .exe

  5. #5
    Registered User
    Join Date
    10-25-2017
    Location
    mmmm
    MS-Off Ver
    2016
    Posts
    15

    Re: VBA \ Macros \ Forms \ Workbook \ Workbook makes visible itself

    I visuallly see it, it keeps popping in front of my userforms, if I try to close it, I close the entire application.
    I just want this to work as a .exe, can I make it?

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: VBA \ Macros \ Forms \ Workbook \ Workbook makes visible itself

    .
    I just want this to work as a .exe, can I make it?
    Do you mean literally. You want the workbook to be stand alone executable without the need for Excel ?

    If so, search the NET for " Excel to EXE "

+ 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. VBA \ Macros \ Forms \ Workbook \ Failed to create new workbook
    By Francisco Vargas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2017, 07:22 AM
  2. [SOLVED] move all visible worksheets in a workbook all into new single workbook
    By Pi* in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-13-2016, 03:04 PM
  3. move visible of worksheets in a workbook all into new workbook
    By Pi* in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-12-2016, 08:55 PM
  4. Using arrow keys makes another workbook active
    By ffranco9009 in forum Excel General
    Replies: 1
    Last Post: 06-28-2016, 02:39 PM
  5. Workbook.Save makes Userform Disappear
    By Antenne88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-26-2015, 06:30 PM
  6. Can't access macros in personal.xlsb workbook from macros in a second workbook
    By JimFM in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-24-2013, 03:35 PM
  7. Save workbook when user makes changes
    By James12 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-25-2009, 03:19 PM

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