View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben McClave Ben McClave is offline
external usenet poster
 
Posts: 173
Default Hide Co9lumns based on cell value

Gary,

Place this code in the ThisWorkbook module and change "MySheet" to the sheet you wish to hide columns on.

Ben


Private Sub Workbook_Open()

Sheets("MySheet").Columns("P:AB").EntireColumn.Hid den = _
(Sheets("Start").Range("U4").Value = "OFF")

End Sub