+ Reply to Thread
Results 1 to 7 of 7

Clicking the X

Hybrid View

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    50

    Clicking the X

    Hi,

    I have a workbook that has quite a bit of code underneath. Anyway, ONLY when having multiple workbooks open, clicking the X in the upper right corner (Windows 7), doesn't do anything, it should close Excel (querying to save changes). It only happens when the one multiple workbooks are open and the X is clicked in the workbook with all the VBA code. The workbook is password protected as is the code. When all other documents are closed, the X works.

    Any ideas?

    TIA!

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Clicking the X

    When you say password protected, did you do that or another? If another, if you know the password, then look at the ThisWorkbook object to see what the code does.

  3. #3
    Forum Contributor
    Join Date
    08-23-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: Clicking the X

    If you've narrowed it down to one workbook, is it possible that that workbook has code in it that prevents closing via the X? If that seems unlikely (like if there is no obvious reason why a developer would want to stop the workbook from being closed), maybe it's an accident of sorts. It could be a macro that is running, for example one that is set to activate when a value is entered into a cell. This type of event will take up system resources because it is always "looking" at the cell and waiting for a value to be entered.

    Is there anything special about the workbook that is causing this?
    IF("helping me", "thanks", "need more detail?")

  4. #4
    Forum Contributor
    Join Date
    08-23-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: Clicking the X

    I am assuming that because you said it is password protected, you don't know the password and therefore can't just look in the code to see what's happening?

  5. #5
    Registered User
    Join Date
    10-10-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Clicking the X

    Quote Originally Posted by jayherring86 View Post
    I am assuming that because you said it is password protected, you don't know the password and therefore can't just look in the code to see what's happening?
    No, I know the password. I locked it down. Note some other info, there are dynamic active x controls added (about 100). There's also and auto_open and auto_close script.

    The auto_open enables events on dynamically created active x controls, loads variables from hidden cells, and does some other clean up and preparation. The auto_close loads in to the cells the values of the variables.

  6. #6
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Clicking the X

    What happens when the corner X is clicked when only the macro heavy workbook is open.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  7. #7
    Registered User
    Join Date
    10-10-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Clicking the X

    Quote Originally Posted by mikerickson View Post
    What happens when the corner X is clicked when only the macro heavy workbook is open.
    It closes the file (or prompts with a save dialog box). Only happens when multiple files (workbooks) are open and the user tries to close the one with all the macros
    Last edited by steven_b46; 01-13-2015 at 06:36 PM.

+ 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] Pop up box when clicking on an Icon
    By mdoverl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-06-2014, 03:19 PM
  2. Replies: 1
    Last Post: 02-07-2012, 07:09 AM
  3. Saying Thanks by clicking the Scales
    By jwright650 in forum The Water Cooler
    Replies: 3
    Last Post: 01-28-2011, 04:02 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