View Single Post
  #2   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,

One other thought: you could enter the code on the "Start" sheet's code module under the Deactivate event. That way the users can change cell U4 of the "Start" sheet and see the change right away, but you won't have the event firing every time a cell is selected on other sheets. Here's the modified code:

Private Sub Worksheet_Deactivate()

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

End Sub