Hello Guys,
I'm trying to set event in my sheet that when the value of Cell "M1" in "Sheet Home" is changed to unhide specific shape.
I used the following event and code:
I've tried this as well:
None of them worked although the code separately worked just fine, it seems that the issue is with the event
I'm saving the event in the "Home" sheet macro whereas the code in separated Module
I wish this forum allows to attach my file with the post to ease for you checking the issue, would you please help, thank you.
I'm trying to set event in my sheet that when the value of Cell "M1" in "Sheet Home" is changed to unhide specific shape.
I used the following event and code:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("M1")) Is Nothing Then HideUnhideShape
End Sub
Sub HideUnhideShape()
If Worksheets("Home").Range("M1") = "" Then
ActiveSheet.Shapes("Rectangle 1").Visible = False
Else
ActiveSheet.Shapes("Rectangle 1").Visible = True
End If
End Sub
I've tried this as well:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("M1")) Is Nothing Then Call HideUnhideShape
End Sub
Sub HideUnhideShape()
If Worksheets("Home").Range("M1") = "" Then
ActiveSheet.Shapes("Rectangle 1").Visible = False
Else
ActiveSheet.Shapes("Rectangle 1").Visible = True
End If
End Sub
None of them worked although the code separately worked just fine, it seems that the issue is with the event
I'm saving the event in the "Home" sheet macro whereas the code in separated Module
I wish this forum allows to attach my file with the post to ease for you checking the issue, would you please help, thank you.