Unhide next hidden column VBA

lewdow

New Member
Joined
Oct 8, 2008
Messages
25
Hi,

I have one column for each month of the year, and all upcoming months are hidden.

Each month I then go in and unhide the hidden columns, and re-hide everything but the next month:

e.g. in March

Jan Feb (Mar Apr May June July................)

Unhide all hidden columns:

Jan Feb Mar Apr May June July................

Re Hide the rest of the year:

Jan Feb Mar (Apr May June July................)

Is there a way to do this via VBA instead of doing it each and every month?

It has to be done on multiple sheets which is why it is so time consuming, however the columns are identical on each sheet.

Any ideas?

Thanks

Lewis
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Perhaps

Select a cell to the left of a column you want to unhide

ActiveCell.Offset(0, 1).EntireColumn.Hidden = False
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top