+ Reply to Thread
Results 1 to 3 of 3

Activate one sheet from another using wildcards?

  1. #1
    Registered User
    Join Date
    10-01-2009
    Location
    Durham, NC
    MS-Off Ver
    Excel 2007
    Posts
    14

    Activate one sheet from another using wildcards?

    Hello, I would like to use a button on one worksheet to activate another worksheet that will contain "Perf_Meas_Eval" in its filename. I've tried using the wildcard with Window.Activate but it's not working. I would appreciate any help!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Activate one sheet from another using wildcards?

    Hi,

    From your description it would suggest that you're trying to activate another workbook which is already open in memory. In which case one way is to set two variables immediately after your macro has opened the workbook. e.g.

    Please Login or Register  to view this content.
    Now you can use

    Please Login or Register  to view this content.
    and if necessary

    Please Login or Register  to view this content.
    wherever you like in your code. I'd be inclined to also set a variable for your main workbook that contains all your code, e.g. Set wbMain = ActiveWorkbook in a similar way so that you can always jump back to it when necessary.

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    10-01-2009
    Location
    Durham, NC
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Activate one sheet from another using wildcards?

    Thank you Richard. I will try your suggestion.

    For future reference, though, is there another way to accomplish this? Here is the situation:
    The user will have 2 workbooks open, one is the "control panel" that has all the code and some buttons on it to run the code. The other is the "performance measure" workbook, which I would like the code to operate on. I was hoping there was a line of code that, when a button is clicked on the "control panel", would activate the open workbook that contains "perf_meas_eval" in the filename, so that the code will run on the correct book.

    The way I have it set up now, the code does not open the performance measure workbook; it is already open (I'm assuming the user is already working in it).

    Thanks again for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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