View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Philip J Smith Philip J Smith is offline
external usenet poster
 
Posts: 80
Default How to recalculate a worksheet when a selection is made

I use data validation to allow selection from a short list.

The data validation is in cell C2.

I am trying to use the Worksheet_SelectionChange event to trigger
recalculation of the worksheet, but the code below doesn't seem to be working.

Could someone point out the syntax error please?

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Intersect(Me.Range("B2"), Target) Is Nothing Then Exit Sub
Me.Calculate
End Sub

Regards

Phil Smith