Hi I have this code that will run when something entered into C3.
I can't get it to run properly as I get error saying the sheet it still locked
If I step through the code (F8) it works but not if I let it run
Your advice will be much appreciated!
![]()
Private Sub Worksheet_Change(ByVal Target As Range) Dim ws As Worksheet If Target.Address = "$C$3" Then For Each ws In ThisWorkbook.Worksheets ws.Unprotect Password:="xxx" Next ws Application.Wait (Now + TimeValue("0:00:10")) Workbooks(ThisWorkbook.Name).RefreshAll For Each ws In ThisWorkbook.Worksheets ws.Protect Password:="xxx" Next ws End If End Sub
Bookmarks