View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Aria Weston Aria Weston is offline
external usenet poster
 
Posts: 3
Default Worksheet_Calculate or Worksheet_Change?

Hello,
Should I use Worksheet_Calculate or Worksheet_Change in order to trigger
the code once the target cell is updated through formula?

If it's Worksheet_Calculate, how do you rewrite this (code doesn't
work)?

Private Sub Worksheet_Calculate()
Range("A4") 'is the only target cell
If date("A4") date("A5") and date("A4") < date("A6") then
worksheets("Sheet1").columns("C:E").entirecolumn.h idden = True
End If
End Sub

Do I need application.enableevents=False to start, then end it with
application.enableevents=True?

Thank-you so much,
Aria

*** Sent via Developersdex http://www.developersdex.com ***