austin350s10
Active Member
- Joined
- Jul 30, 2010
- Messages
- 321
I am working on a sheet that needs to run a script when specified range changes it's calculated value.
I tried using the Worksheet_Change event but the problem is that the range I am monitoring contains only calculated values not real values. When the script I have now runs it sees that the cells in the range have not changed because it is looking at the formula in the cell. Is there a way to check the calculated value instead of the formula?
Code Now:
I tried using the Worksheet_Change event but the problem is that the range I am monitoring contains only calculated values not real values. When the script I have now runs it sees that the cells in the range have not changed because it is looking at the formula in the cell. Is there a way to check the calculated value instead of the formula?
Code Now:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Range1 As Range
Set Range1 = Range("A3:A10")
If Not Intersect(Target, Range1) Is Nothing Then
For Each wks In ThisWorkbook.Worksheets(Array("Blood Sugar Log", "Blood Pressure Log", "Respiration Log", "Pulse Log", "Weight Log", "Temperature Log", "Medication Log", "Blood Sugar Log", "Blood Sugar Log Plus"))
wks.Visible = xlSheetVeryHidden
Next wks
For Each c In Range1
Dim L1 As String
If c <> "- Pick Log Sheet -" Then
For Each wks In ThisWorkbook.Worksheets(Array("Blood Sugar Log", "Blood Pressure Log", "Respiration Log", "Pulse Log", "Weight Log", "Temperature Log", "Medication Log", "Blood Sugar Log", "Blood Sugar Log Plus"))
L1 = wks.Name
If c = L1 Then
wks.Visible = xlSheetVisible
End If
Next wks
End If
Next c
End If
End Sub