PDA

View Full Version : How To Use Option Buttons To Switch Between Sheets



raybugge
06-27-2013, 07:42 PM
Hi All,

I have a Main Page which holds 13 Option Buttons. I need VBA code so that the Main Page is always visible and there is always 1 month sheet or Record Sheet visible. The only month I want visible is the 1 selected by the option button. So at any 1 time there will be 2 sheets visible (Main Page + month Sheet)....The Main Page is the control page

Best Regards

Ray Bugge
Excel 2010/2013

Admin
06-27-2013, 10:50 PM
Hi raybugge,

Welcome to Excel Fox !!

Please find attached. I have assigned the code for first 3 buttons. Do the same for other buttons as well. To do so, right click on 'Main page' tab > view code and select each button click event from the first drop down on the top of the VB editor window.

raybugge
06-28-2013, 03:52 PM
Hi
That is excellent I could not get April 2014 to work. Have I missed something.
Thanks for help
Ray

Ingolf
06-29-2013, 12:38 AM
Hi
That is excellent I could not get April 2014 to work. Have I missed something.


Yes, you missed a sheet with APRIL 2014 name.

raybugge
06-29-2013, 02:51 AM
Yes i realise the sheet for April2014 is missing but i have 12 Option buttons in the code but i cannot get April to appear
Cheers
Ray Bugge

Ingolf
06-29-2013, 02:20 PM
Take a look to file attached. I just create sheet "APRIL 2014" and nothing more. And it's working...

raybugge
06-29-2013, 03:20 PM
Thanks Ingolf