victor86
08-13-2018, 11:00 PM
Hi Friends,
any solution for my case?
im trying to creat auto call macro (simple solver - in another module) with this code :
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim KeyCells As Range
Set KeyCells = Range("$D$15:$F$19")
Run "macro1"
Sheets("sheet1").Select
ActiveSheet.Unprotect Password:="love"
End Sub
Its works to autocall macro (with password : love), when im change the row from D15 : F19 with ENTER
But after ENTER i want the sheet protected again
i had try to add this code before End Sub :
Sheets("sheet1").Select
ActiveSheet.Protect Password:="love"
but still failed. Anyone help me ? :)
thank you
any solution for my case?
im trying to creat auto call macro (simple solver - in another module) with this code :
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim KeyCells As Range
Set KeyCells = Range("$D$15:$F$19")
Run "macro1"
Sheets("sheet1").Select
ActiveSheet.Unprotect Password:="love"
End Sub
Its works to autocall macro (with password : love), when im change the row from D15 : F19 with ENTER
But after ENTER i want the sheet protected again
i had try to add this code before End Sub :
Sheets("sheet1").Select
ActiveSheet.Protect Password:="love"
but still failed. Anyone help me ? :)
thank you