Enhancement to Tab Selection

I'd like to hide the tabs on a particular spreadsheet. When a particular industry is selected, the tab is displayed and the cursor goes to A1 in that particular tab.  The industry tab is displayed/reveailed.  Then when the sheet is "reset", all of the industry tabs are again hidden (small macro).

Sample included;

Thank you in advance,

Bright01

Simple-Tab-Selection.xlsm
Bright01Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Curt LindstromCommented:
Try this one

Cheers,
Curt
Simple-Tab-Selection-mod1.xlsm
0
Bright01Author Commented:
epaclm,

Thank you for the rapid response!  The Sheet(s) work great except for one little debug error.

I get an error 91 "Object Variable, or Block Variable Not Set".  If I save it to my harddrive, I can than use it without getting the error.  Considering I'm going to be sending this to others, I was wondering if you could take a look at the error and put in the line or two that fixes that installation or first time run problem.

Much thanks,

B.
0
Swapnil NirmalManager, Audit AnalyticsCommented:
done..
please find attached
Simple-Tab-Selection.xlsm
0
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Curt LindstromCommented:
B,

I cannot reproduce the error 91 "Object Variable, or Block Variable Not Set" that you get. it works for me even running directly from downloading my own uploaded version without saving.

You should always save it to your harddrive before using it anyway.

Maybe it's due to the variables not being declared in your original macro. Try this one to see if you get the error or not.

Cheers,
Curt
Simple-Tab-Selection-mod2.xlsm
0
Bright01Author Commented:
Curt,

Two things;

1.) If you choose "Banking" (and this is only for that choice for some reason), you get the selection tab choices in the upper left corner.
2.) The new code, does not show the tabs.  I actually like having the choice to show or not show. Can I ajust that in the code itself?

Thanks,

B.
0
Bright01Author Commented:
n,

I tried your code and it doesn't change to the right tab when selecting the industry.  I think Curt has this nailed with the one or two quick fixes I listed above.  However, "Thank you" for jumping in.

B.
0
Curt LindstromCommented:
B,

Regarding your questions:

1) The selection tab choices in A1 was there in your original file. I just left it there as it was since I didn't know what you wanted to do with that one.

2) I'm not sure what you want. I thought the feature you wanted was to select one of the tabs and then close it (hide it) when you press the return button. Just let me know if you want it to behave in any other way. You can of course adjust this yourself as long as you understand how the macros work. There 2 macros controlling each sheet. One macro runs when the sheet is activated and the other one runs when the sheet is deactivated.


Cheers,
Curt
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bright01Author Commented:
Great job Curt!

Much thanks!

B.
0
Bright01Author Commented:
Curt,

As I have incorporated this into my production file, I have to ask a related question.

B.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.