Solved

Directing a "Go To" statement in a Macro

Posted on 2013-01-06
5
221 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
  • 3
5 Comments
 
LVL 26

Assisted Solution

by:redmondb
redmondb earned 350 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 150 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 350 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now