Nov 16 2018 06:25 PM
I have a spreadsheet where the balance sheet and income summaries for each month of 2017 and 2018 are presented. To clarify, January 2017 is next to January 2018, February 2017 is next to February 2018, etc.
I'm trying to write a Macro in VBA that hides all of the 2017 columns or the 2018 columns depending upon the year selected from a drop down box. So far, I can hide 2017, but then if I pick 2018, everything is hidden. I need for the routine to hide one year and not hide the other.
Here's what I have done so far:
Nov 16 2018 07:42 PM - edited Nov 16 2018 07:43 PM
before hiding 2018 - unhide 2017 first. and vice-versa
wouldn't that work?
Nov 16 2018 09:33 PM
pls see attached sample.
hope you can work something out of it.
thanks..
Nov 16 2018 09:40 PM - edited Nov 16 2018 09:44 PM
Just add this line before for-loop
Columns("D:AP").EntireColumn.Hidden = False
Nov 17 2018 06:33 AM
It works! Much more sophisticated than mine and I don't understand it all yet, but thank you very much!
Nov 17 2018 06:33 AM