Evening all
I have a worksheet with a button that performs a web query to update rates, I would like to have the cells locked before calculation, then unlocked during calculation and re-locked after. I have done this before without any problem but for some reason it is not working this time, the code I am using is
Public Sub UnProtectMe() Dim oSht As Worksheet For Each oSht In Worksheets oSht.Unprotect "password" Next oSht ActiveWorkbook.RefreshAll For Each oSht In Worksheets oSht.Protect "password" Next oSht End Sub
However I get the error shown below?