In general you just set the EntireColumn.Hidden property to True or False to hide/unhide a particular column. Columns("I:I").EntireColumn.Hidden = True
Ciao, Mark
: I am looking for a method to hide a selected column using VBA in excel. To select a column I: : : Worksheets("Sheet1").Columns(1).Select : : That's as far as I get. The column is now selected. How do I hide the selected column?????? : : Thanks : Ranny :
Comments
With any kind of simple task you can use the macro recorder in order to automatically generate the code for you:
ie:
Columns("I:I").Select
Selection.EntireColumn.Hidden = True
In general you just set the EntireColumn.Hidden property to True or False to hide/unhide a particular column.
Columns("I:I").EntireColumn.Hidden = True
Ciao,
Mark
: I am looking for a method to hide a selected column using VBA in excel. To select a column I:
:
: Worksheets("Sheet1").Columns(1).Select
:
: That's as far as I get. The column is now selected. How do I hide the selected column??????
:
: Thanks
: Ranny
: