+ Reply to Thread
Results 1 to 4 of 4

Open a workbook on closing another

  1. #1
    Registered User
    Join Date
    11-29-2018
    Location
    Sunny Cairns, QLD AUST
    MS-Off Ver
    2010
    Posts
    97

    Open a workbook on closing another

    Here is a simple request. It was a very simple thing to do in Excel back before VBA but I can't find it in VBA.

    I want to open a workbook when I click on the close "X" symbol on another workbook.

    I am sure there must be an "On_click" function associated with the "X".

  2. #2
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    419

    Re: Open a workbook on closing another

    I think Workbook_BeforeClose will do what you want:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-29-2018
    Location
    Sunny Cairns, QLD AUST
    MS-Off Ver
    2010
    Posts
    97

    Re: Open a workbook on closing another

    I have tried that but it doesn't seem to work. Where should I be putting it?

  4. #4
    Registered User
    Join Date
    11-29-2018
    Location
    Sunny Cairns, QLD AUST
    MS-Off Ver
    2010
    Posts
    97

    Re: Open a workbook on closing another

    Found it. ThisWorkbook code area.

+ 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. Open and closing a workbook at a certain time
    By Roadhouse in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2015, 01:47 PM
  2. Closing a workbook if someone has it open
    By cedric9996 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2014, 06:07 PM
  3. Open a workbook off my desktop then closing current workbook
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-18-2013, 03:34 PM
  4. [SOLVED] Checking if a workbook is already open and closing it
    By amircea27 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-02-2013, 10:26 AM
  5. Prevent closing of one workbook when two are open
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-02-2009, 11:45 AM
  6. Problem with Closing an open workbook with vba.
    By spyrule in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2006, 04:13 PM
  7. Closing an open workbook
    By Dan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2006, 04:00 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