+ Reply to Thread
Results 1 to 2 of 2

Closing workbooks

  1. #1
    Registered User
    Join Date
    01-09-2007
    Posts
    54

    Closing workbooks

    Hello,

    I have two workbooks, one of which has a userform with a cancel button on.
    When one workbook is opened the other automatically opens and the Userform pops up.

    When I click the cancel button I want both workbooks to close, but they don't, only one of them closes. The code I have used is:

    Please Login or Register  to view this content.
    Yet if I assign this code to a command button in one of the worksheets it closes both??

    Any ideas why this is happening?

    Thanks

    Alex

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Which one has the command button & the macro?

    Would it be the one closing 1st?
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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