+ Reply to Thread
Results 1 to 2 of 2

Calling macro in another workbook

  1. #1
    Registered User
    Join Date
    07-23-2009
    Location
    Providence
    MS-Off Ver
    Excel 2003
    Posts
    5

    Calling macro in another workbook

    Hi,

    i currently have workbook1 that runs some macros. When the last macro is done, i want to be able to open another workbook (workbook2) and run a macro on that workbook. Also i want to close workbook1, if possible.

    Anyone ever tried this before?

    thanks
    scott

  2. #2
    Forum Contributor
    Join Date
    01-21-2005
    Location
    Colorado
    MS-Off Ver
    2000,2003,2007
    Posts
    481

    Re: Calling macro in another workbook

    You can open the other workbook and call a macro in it.
    However in my experience once you close the first workbook it will kill any macros that were called from it, i.e. the macro you started running in the second workbook.

    An option may be to use the Workbook_Open event handler in the second workbook close the first and then run the desired macro. This however will always run when the second workbook is opened regardless of if it is opened from the first workbooks macros or opened manually.

    HTH

+ 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