Hello , I have a task which I have 0 Knowledge in and want some help.
So the task is to make macro run if i change a value in a certain cell , ex; on a certain sheet named "config" I entered a value in a certain cell which is the password for all sheets, and the task is to make a macro whenever I change the value to a new one "which is basically the password" it does update the password for all sheets to this new value
Any help is appreciated.
Btw here is the code which he typed but yeah it isnt a code
Dim oldValue As Variant
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
oldValue = Target.Value
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim newValue As Variant
newValue = Target.Value
If newValue <> OldValue
unprotect sheet Januar2022 by oldBValue
protect sheet Januar2022 by newBValue
unprotect sheet Febraur by oldBValue
protect sheet Febraur by newBValue
unprotect sheet März by oldBValue
protect sheet März by newBValue
unprotect sheet April by oldBValue
protect sheet April by newBValue
unprotect sheet Mai by oldBValue
protect sheet Mai by newBValue
unprotect sheet Juni by oldBValue
protect sheet Juni by newBValue
unprotect sheet Juli by oldBValue
protect sheet Juli by newBValue
unprotect sheet August by oldBValue
protect sheet August by newBValue
unprotect sheet September by oldBValue
protect sheet September by newBValue
unprotect sheet Oktober by oldBValue
protect sheet Oktober by newBValue
unprotect sheet November by oldBValue
protect sheet November by newBValue
unprotect sheet Dezember by oldBValue
protect sheet Dezember by newBValue
End If
End Sub
Private Sub Worksheet_TableUpdate(ByVal Target As TableObject)
End Sub
Bookmarks