quick_question
New Member
- Joined
- May 31, 2011
- Messages
- 32
I'm trying to build a message box that will appear, but is conditional based on the value of another cell.
The cell that holds the value has a formula that is reacting to a slicer selection - because it is my understanding basing a message box conditional to a slicer selection directly is either not possible or inefficient.
I've created an IF(OR()) conditional formula in this cell (AS22) to evaluate the slicer selections and either assign a 1 or 0 to AS22.
I'm trying to build a message box macro that will generate a message box if the value of AS22 is 1, but not if the value is 0.
Here is what I have put together (I have put this macro into the specific tab (Controls) macro-page:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Addess = ("$AS$22") Then
If Target.Value = 1 Then
MsgBox "Message Box Test"
End If
End If
End Sub
My problem is that when I go back to the main spreadsheet to select a slicer option, and thus trigger this macro - I continue to get the error message "Run-time error "438": Object doesn't support this property or method"
I can not figure out what is going wrong, or what to change to make this functional.
Any help is greatly appreciated!!
Thanks.
The cell that holds the value has a formula that is reacting to a slicer selection - because it is my understanding basing a message box conditional to a slicer selection directly is either not possible or inefficient.
I've created an IF(OR()) conditional formula in this cell (AS22) to evaluate the slicer selections and either assign a 1 or 0 to AS22.
I'm trying to build a message box macro that will generate a message box if the value of AS22 is 1, but not if the value is 0.
Here is what I have put together (I have put this macro into the specific tab (Controls) macro-page:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Addess = ("$AS$22") Then
If Target.Value = 1 Then
MsgBox "Message Box Test"
End If
End If
End Sub
My problem is that when I go back to the main spreadsheet to select a slicer option, and thus trigger this macro - I continue to get the error message "Run-time error "438": Object doesn't support this property or method"
I can not figure out what is going wrong, or what to change to make this functional.
Any help is greatly appreciated!!
Thanks.