+ Reply to Thread
Results 1 to 4 of 4

Activating another open workbook with unknown name

  1. #1
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Activating another open workbook with unknown name

    Hi,

    I have my VBA Codes set in a workbook (Production) that my supervisors open to calculate production. So when they open the workbook (Production) I have a button that they push that starts the code however I need to put something in that activates the other open workbook, The problem is that the name of the workbook that they run the code on can change.

    How can I make the other open workbook activate.

    Any Ideas?

    Thank You, Mike
    Last edited by realniceguy5000; 05-29-2009 at 03:11 PM.

  2. #2
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Re: Activating another open workbook with unknown name

    I was able to get this small script to do what I needed. Somehow it ends up on the other open workbook.

    So the script works now.

    Thank You, Mike

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Re: Activating another open workbook with unknown name

    Quote Originally Posted by realniceguy5000 View Post
    I was able to get this small script to do what I needed. Somehow it ends up on the other open workbook.

    So the script works now.

    Thank You, Mike

    Please Login or Register  to view this content.
    I was wrong again. This is close to what I need but not working as expected in the live version.

    For some reason the script starts on the production sheet then finds the next open workbook then returns to the production sheet again. I need the script to exit when the next open workbook is found?

    Thank You,Mike

  4. #4
    Registered User
    Join Date
    07-19-2010
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Activating another open workbook with unknown name

    I know this is an old post, but I came across it while searching for this exact thing.

    If you only have two workbooks open at the time, then this should work. Basically, this will note the name of the active workbook and then compare the name as the active workbook changes. If the name is different, then it will exit sub.

    Please Login or Register  to view this content.
    Last edited by pclive; 08-13-2010 at 04:09 PM.

+ 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