Hi all,
I have some code attributed to a button currently and I want to change it so that it runs automatically based on the value of a cell.
I believe it needs to be a change event? But I cant seem to get it to work.
Below is the code that I currently have running off a button.
Any help/advice would be much appreciated.
Thank you
I have some code attributed to a button currently and I want to change it so that it runs automatically based on the value of a cell.
I believe it needs to be a change event? But I cant seem to get it to work.
Below is the code that I currently have running off a button.
Code:
Sub QuestionOne()
Application.ScreenUpdating = False
ActiveSheet.Unprotect "Password"
If [m34] = "Yes" Then
Rows("35:38").Hidden = False
ElseIf [m34] = "No" Then
Rows("35:38").Hidden = True
Range("M35:M38").Select
Selection.ClearContents
Range("M34").Select
End If
ActiveSheet.Protect "Password"
Application.ScreenUpdating = True
End Sub
Any help/advice would be much appreciated.
Thank you