macro to hide columns

S

Shooter

My spreadsheet has data in cells A1:G20. I would like to create a macro to
hide columns D, E, F&G. Similarly, I would like to create a macro to unhide
the same columns. I appretiate your help with code to do this.
 
R

Ron de Bruin

Try

ActiveSheet.Range("D1:G1").EntireColumn.Hidden = True

Set it to false to unhide them
 
Top