[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Directing a "Go To" statement in a Macro

Posted on 2013-01-06
5
Medium Priority
?
229 Views
Last Modified: 2013-01-06
EE Pros;

I have a WB that has four WSs.  All are hidden when the WB is opened except WS1.  Based on a choice on WS1, one of two other worksheets is opened (either WS2 or WS3). From either WS2 or WS3, a button directs WS 4 to be opened and used.  When finished with WS4, I want to return to WS 2 or 3 DEPENDING ON WHICH ONE IS OPEN (NOT HIDDEN).  While going to WS4 is easy, how I get a macro to determine which WS is open (WS 2 or 3) and go to it, while hiding again WS4 is not something I know how to do but would expect it needs an "if" Statement and a macro.

Any help would be most appreciated.

B.
0
Comment
Question by:Bright01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 26

Assisted Solution

by:redmondb
redmondb earned 1400 total points
ID: 38749004
Hi, Bright01.

I'm not sure I've correctly understood your requirements, but please see attached.

Regards,
Brian.
Appearances.xlsm
0
 
LVL 10

Assisted Solution

by:etech0
etech0 earned 600 total points
ID: 38749007
Do you have the rest of the code set up yet? If so, can you post it?

You'd probably need something like this:

If Worksheets("WS2").Visible then Worksheets("WS2").select
If Worksheets("WS3").Visible then Worksheets("WS3").select

Open in new window

0
 
LVL 26

Accepted Solution

by:
redmondb earned 1400 total points
ID: 38749014
...and a small change so that selecting WS2 or WS3 from WS1 will hide the other sheet.Appearances-V2.xlsm
0
 

Author Closing Comment

by:Bright01
ID: 38749212
Great Teamwork!  Fast and accurate.

Much thanks,

B.
0
 
LVL 26

Expert Comment

by:redmondb
ID: 38749627
Thanks, Bright01.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question