+ Reply to Thread
Results 1 to 4 of 4

Closing a specific workbook automatically closes the form

  1. #1
    Registered User
    Join Date
    08-25-2017
    Location
    FRANCE
    MS-Off Ver
    2016
    Posts
    2

    Closing a specific workbook automatically closes the form

    Hello,


    My macro needs to close a specific workbook without closing the form, as I need to keep the macro running.

    However, when it does using the code [Workbooks("DATA_FILE.xls") .Close], the form is automatically closed and the program stops.

    This should not happen and does happen ONLY with this specific file.

    Of course, the code is not stored in this workbook.

    Do you happen to know why please?

    Could there be some specific link between the file and the form that could be removed?

    I have tried everything I could and so far I’m not able to understand why this is happening with a specific workbook and not the others.


    Thank you so much.

    Have a nice day.

    Franck.

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Closing a specific workbook automatically closes the form

    in the before close or close code for this particular workbook, is Application.Quit causing it??

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Closing a specific workbook automatically closes the form

    crosspost: http://www.ozgrid.com/forum/showthre...d=1#post798873

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    08-25-2017
    Location
    FRANCE
    MS-Off Ver
    2016
    Posts
    2

    Re: Closing a specific workbook automatically closes the form

    Hello,
    It is after the close code; Application.Quit is not causing it
    Kind regards

+ 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. What causing user form to automatically closing?
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2017, 09:14 AM
  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. Save and exit workbook when user form closes
    By savio21 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2011, 11:21 AM
  4. Macro opens some MS workbooks, takes specific data in Master Workbook, then closes.
    By SunOffice in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-04-2010, 05:41 PM
  5. Shared Excel Workbook closes automatically while opening
    By saurabh.m in forum Excel General
    Replies: 0
    Last Post: 12-09-2009, 05:52 AM
  6. Automatically closing workbook
    By zapszipszops in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-19-2006, 11:50 AM
  7. Opened Autosave but when closing workbook Autosave closes itself
    By Ken in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-29-2005, 01:05 PM

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