Macro with "If" Statement for choosing which Macro to run
Posted on 2013-01-02
I have three tabs on in a Workbook -- Sheets 1, 2 and 3. Only Sheet 1 is visable; the other two are hidden. I have built a Macro on Sheet 1 that will "expose" EITHER Sheet 2 or 3 but not both at the same time. Here is my challenge....; I need a Macro that can be fired from Sheets 2 OR 3 that will hide them and return you to Sheet 1 (.Active). What I don't know is how to use an "if" statement in a macro, and what do I use to identify if it's Sheet 2 or Sheet 3 that is exposed (the Sheet name?)? I would envision something like;
But only as a "macro newbee"!