Hide Show columns by vba

Solved
jean300 Posted messages 382 Status Member -  
jean300 Posted messages 382 Status Member -
Hello,
Once again, I call upon your expertise, thanking everyone who will provide me with the necessary codes.
I would like to hide and unhide the columns:
In the first code:
C:E - J:M - O:Q - S:U and X:AF so that they cannot be displayed through:
Format, Column, Unhide or by selecting before after the hidden columns.
In the second step:
To be able to re-display them

Configuration: Windows / Firefox 55.0

6 answers

  1. Archer
     
    Hello
    in the simplest way
     Sub Cache() ' hide column Cells.EntireColumn.Hidden = False Range("C:E,J:M,O:Q,S:U,X:AF").EntireColumn.Hidden = True End Sub Sub DeCache() ' unhide column Cells.EntireColumn.Hidden = False End Sub 

    See you
    Maurice
    2