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!
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!
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.
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.![]()
Please Login or Register to view this content.
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 iconbelow the post.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks