I have the following piece of code that works with no problems when associated with a specific sheet Sheets("IAMT") however I would like to move this code to the Workbook_Open() function but I don't know how to bound this to reference the specific sheet.
The code is as follows
Private Sub Workbook_Open()
Application.ScreenUpdating = False
For Each Cll In Range("F3:FF3")
If Cll.Value > DTPicker22.Value Or Cll.Value < DTPicker21.Value Then Cll.EntireColumn.Hidden = True Else Cll.EntireColumn.Hidden = False
Next Cll
Application.ScreenUpdating = True
End Sub
help much appreciated
Bookmarks