+ Reply to Thread
Results 1 to 6 of 6

Excel file wont close if more than 1 file open

  1. #1
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    919

    Excel file wont close if more than 1 file open

    Hello

    I have problem with my macro excel file, I cant close it if I have another excel file opened, when I try to close my file, its re-open again.
    always I need to close all excel files first, then close my file

    I keep searching for the problem but I didnt it
    kindly anyone can solve it..

    Thanks
    Attached Files Attached Files

  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: Excel file wont close if more than 1 file open

    Check exactly what is the code in "workbook before close event" supposed to be doing. I would have thought stopping the timer would have been the first thing to do

  3. #3
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    919

    Re: Excel file wont close if more than 1 file open

    COOL!
    yes problem from timer
    i have macro name " StopBtn" to stop timer
    how can I run it once user confirm he want close file?

    This not working for me

    Please Login or Register  to view this content.
    and if i place stopbtn_click upon if closemode, its working but even if i click cancel button will click
    i want click button after user confirm close with saveing or without

    Thanks

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

    Re: Excel file wont close if more than 1 file open

    this does it
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    919

    Re: Excel file wont close if more than 1 file open

    this code will stop timer even if i save my workbook, its possible to stop it when user approve for closing?

  6. #6
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    919

    Re: Excel file wont close if more than 1 file open

    i got the fix solution
    but i want the event where should i place my code if user click cancel in attached photo


    this not working
    Please Login or Register  to view this content.
    Attached Images Attached Images

+ 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] File dialog box to open a excel file then copy data close file
    By mmikem in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-01-2019, 09:57 AM
  2. [SOLVED] Macro to open Excel file, run other macros save, and close file & repeat.
    By Ronnet2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2015, 09:47 AM
  3. Replies: 0
    Last Post: 10-02-2013, 01:47 AM
  4. Open 2nd file(CSV) from cell reference, copy columns to main file & close 2nd file
    By Langchop in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2013, 05:09 AM
  5. [SOLVED] Schedule Excel to open file, print sheets, close file
    By tonychopra194 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-22-2012, 05:15 AM
  6. Excel 2007 : excel file wont open
    By Yigal in forum Excel General
    Replies: 11
    Last Post: 09-07-2011, 01:46 AM
  7. How to: Open file, format data, save file, close file and repeat.
    By thexeber in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-11-2010, 12:56 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