rickincanada
Board Regular
- Joined
- Aug 31, 2010
- Messages
- 61
Hello,
I have a created a VBA Function that declares and then uses the value from cell A1 on Sheet1 (data validation displays a list of acceptable values) inside the function. The problem I'm having is that I'm then using that function to calculate a value in cell A1 on Sheet2. When I change the value on Sheet1 the function does not re-calculate on Sheet2. I've tried adding something along these lines but it isn't working.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address = "$A$1 Then
Worksheets("Sheet2").Activate
ActiveSheet.Calculate
Worksheets("Sheet1").Activate
Range("A1").Select
End If
End Sub
Please help!!
Thanks,
Rick
I have a created a VBA Function that declares and then uses the value from cell A1 on Sheet1 (data validation displays a list of acceptable values) inside the function. The problem I'm having is that I'm then using that function to calculate a value in cell A1 on Sheet2. When I change the value on Sheet1 the function does not re-calculate on Sheet2. I've tried adding something along these lines but it isn't working.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address = "$A$1 Then
Worksheets("Sheet2").Activate
ActiveSheet.Calculate
Worksheets("Sheet1").Activate
Range("A1").Select
End If
End Sub
Please help!!
Thanks,
Rick