title: EXCEL VBA Set timer to protect/lock worksheet with condition(s)
body: <p>As mentioned in title, what I did was:</p>
  
  <pre><code>Private Sub Workbook_Open()
      Dim ws As Worksheet
      Dim pwd As String
      pwd = "jfm" ' Put your password here
      For Each ws In Worksheets
      ws.Protect Password:=pwd, UserInterFaceOnly:=True
      Next ws
  End Sub
  </code></pre>
  
  <p>But what I want is:</p>
  
  <ol>
  <li>Create a timer, let say 5 seconds</li>
  <li>Check if the worksheet is unprotect, protect the sheet after 5 seconds.</li>
  <li>If the worksheet is protected then repeat to check if the sheet is unprotect.</li>
  </ol>
  
  <p>Thanks in advance.</p>