+ Reply to Thread
Results 1 to 2 of 2

Code in "This Workbook" not triggered

  1. #1
    Registered User
    Join Date
    11-01-2013
    Location
    Essex UK
    MS-Off Ver
    Excel 2003
    Posts
    95

    Code in "This Workbook" not triggered

    Excel 2003 on Windows10

    I have two simple, similar workbooks.
    Each has it's own associated Command Bar which is called up via an Auto Open module.
    The command bar has just one button whose assigned macro closes the workbook.
    In This Workbook, Workbook Activate and Workbook Deactivate are used to make the Command Bar visible true and visible false.
    With both workbooks open, either can be selected as the active one using the standard Menu bar "Window" button.
    The deactivated (or 'closing') workbook's associated command bar is made non-visible by the code in Workbook Deactivate
    and the activated (or 'opening') workbook's bar made visible by the code in Workbook Activate.
    All this works fine.

    However, with both workbooks open, when one is CLOSED, Workbook Activate is NOT triggered in the other and vice versa.

    The code is the same in each workbook, as follows:-

    Please Login or Register  to view this content.
    I cannot find why - any suggestions would be appreciated.
    Last edited by donwb; 06-15-2021 at 09:26 AM. Reason: change thread title

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

    Re: This workbook code dilemma

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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

+ 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. SUM Dilemma
    By Barrera006 in forum Excel General
    Replies: 3
    Last Post: 01-16-2017, 04:00 PM
  2. IF AND dilemma
    By herschen in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-11-2015, 03:47 PM
  3. Working with more than one Workbook dilemma
    By Orada in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2012, 05:42 PM
  4. [SOLVED] Drop down box dilemma
    By mvburg in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-11-2012, 11:39 AM
  5. Code creates new workbook-> code to automatically run a set code on that workbook
    By cwalker6 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2009, 08:00 PM
  6. AVERAGeIFS dilemma....
    By Kenny07 in forum Excel General
    Replies: 5
    Last Post: 03-23-2008, 09:20 PM
  7. [SOLVED] Nth power dilemma
    By Andre Croteau in forum Excel General
    Replies: 6
    Last Post: 06-23-2006, 04:15 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