Hello i like to hide all column except column "A,B,C,D" with worksheet 1 i active only for macro
K kalpesh Mar 5, 2012 #1 Hello i like to hide all column except column "A,B,C,D" with worksheet 1 i active only for macro
D Don Guillett Mar 5, 2012 #2 Hello, i like to hide all column except column "A,B,C,D" with worksheet 1 is active only for macro Click to expand... You didn't mention excel version so this should work with all Sub hidecolumns() Dim lc As Long With ActiveSheet lc = Cells(1, "d").End(xlToRight).Column .Columns.Hidden = False .Columns(5).Resize(, lc - 4).Hidden = True End With End Sub
Hello, i like to hide all column except column "A,B,C,D" with worksheet 1 is active only for macro Click to expand... You didn't mention excel version so this should work with all Sub hidecolumns() Dim lc As Long With ActiveSheet lc = Cells(1, "d").End(xlToRight).Column .Columns.Hidden = False .Columns(5).Resize(, lc - 4).Hidden = True End With End Sub