T
TooN
Hello,
I dont think this is difficult but i cannot get it work properly. I have the
following macro:
Sub PEc_General()
Sheets("sheet1").Columns("D:E").EntireColumn.Hidden = True = Not _
Sheets("sheet1").Columns("D:E").EntireColumn.Hidden = True
Sheets("sheet2").Columns("C:C").EntireColumn.Hidden = True = Not _
Sheets("sheet2").Columns("C:C").EntireColumn.Hidden = True
End Sub
This macro toggles between hiding and showing some columns. Macro works
perfect but i want to extend it a little bit. If i activate the macro it
hides the columns (D,E and C), if i activate it again it shows the columns
again. What i would like is the following. If i activate the macro it hides
the columns and i would like to create an extra column
(Columns("I:I").EntireColumn.Insert Shift:=xlToRight). If i activate the
macro again it shows the columns again and i would like to delete the created
column again (column I)
Hopefully i explained it correct... Thanks
I dont think this is difficult but i cannot get it work properly. I have the
following macro:
Sub PEc_General()
Sheets("sheet1").Columns("D:E").EntireColumn.Hidden = True = Not _
Sheets("sheet1").Columns("D:E").EntireColumn.Hidden = True
Sheets("sheet2").Columns("C:C").EntireColumn.Hidden = True = Not _
Sheets("sheet2").Columns("C:C").EntireColumn.Hidden = True
End Sub
This macro toggles between hiding and showing some columns. Macro works
perfect but i want to extend it a little bit. If i activate the macro it
hides the columns (D,E and C), if i activate it again it shows the columns
again. What i would like is the following. If i activate the macro it hides
the columns and i would like to create an extra column
(Columns("I:I").EntireColumn.Insert Shift:=xlToRight). If i activate the
macro again it shows the columns again and i would like to delete the created
column again (column I)
Hopefully i explained it correct... Thanks