Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Not Hiding Columns
When my code runs, if columns F - P are not already
hidden, the following code is not hiding them ActiveSheet.Columns("F:AM").Select Selection.EntireColumn.Hidden = True I ultimately want all columns from F to AM to be hidden in certain circumstances, but if a portion of the columns have been previously unhidden it will not hide them again. Thoughts? Thanks SS |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Not Hiding Columns
Try unhiding them first before you set the conditions.
range("F1:AM1).entireColumns.Hidden = FAlse For i = 3 to 20 if cells(i,1) = 0 Then cells(1,i).entirecolumn.hidden= True end if Next i Each column will have to be hidden separately if say column A = 0 Regards Peter -----Original Message----- When my code runs, if columns F - P are not already hidden, the following code is not hiding them ActiveSheet.Columns("F:AM").Select Selection.EntireColumn.Hidden = True I ultimately want all columns from F to AM to be hidden in certain circumstances, but if a portion of the columns have been previously unhidden it will not hide them again. Thoughts? Thanks SS . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hiding Columns | Excel Worksheet Functions | |||
Hiding Columns | Excel Discussion (Misc queries) | |||
Hiding columns | Excel Discussion (Misc queries) | |||
Hiding Columns | Excel Programming | |||
Hiding columns in VB | Excel Programming |