This code is activated from a combobox selection on sheet1 and is supposed to hide designated columns on sheets1-3. It works fine on sheet1 but gives "cannot set hidden property" message when it attempts to process sheet2. I have tried a number of ways to qualify this code but can't make it work. Help would be greatly appreciated.
Dim sh As Long
Case Is = "NumberOne"
For sh = 1 To 3 'Sheets 1-3
ThisWorkbook.Worksheets(sh).Columns("F:X").EntireColumn.Hidden = False 'Unhides all columns in range
ThisWorkbook.Worksheets(sh).Columns("G:X").EntireColumn.Hidden = True 'Hides all columns except column F
ThisWorkbook.Worksheets(sh).Range("F2").Select 'Locates cursor on sheet
Next
Bookmarks