Link to home
Start Free TrialLog in
Avatar of Bright01
Bright01Flag for United States of America

asked on

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
Avatar of Curt Lindstrom
Curt Lindstrom
Flag of Australia image

Try this one

Cheers,
Curt
Simple-Tab-Selection-mod1.xlsm
Avatar of Bright01

ASKER

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.
done..
please find attached
Simple-Tab-Selection.xlsm
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
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.
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.
ASKER CERTIFIED SOLUTION
Avatar of Curt Lindstrom
Curt Lindstrom
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great job Curt!

Much thanks!

B.
Curt,

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

B.