title: Improve code readability and speed in Excel VBA
body: <p><strong><em>[PROBLEM 1]</em></strong> I have some VBA commands that make sheet named "MS1" in Excel perform a series of tasks. Some example below:</p>
  
  <pre><code>Sheets("MS1").Unprotect Password:="0123" 
  Sheets("MS1").Visible = xlSheetVisible
  Sheets("MS1").OLEObjects("label1").Object.Caption = "this is label 1"
  Sheets("MS1").Select
      Range("A1").Value = "Hello"
  Sheets("MS1").Protect Password:="0123"
  </code></pre>
  
  <p><strong>[QUESTION 1]</strong> I would like a more concise code by avoiding the repetition of "Sheets("MS1")", so as to improve readability and processing speed. Please, feel free to demonstrate solutions. </p>
  
  <hr>
  
  <p><strong><em>[PROBLEM 2]</em></strong> By exploring code readability ...</p>
  
  <pre><code>    Option explicit
  
      ActiveWorkbook.Unprotect Password:="0123"
  
      Dim R As Variant
      Dim CONJ3 As Variant
  
     With Worksheets("MS2")
       .Unprotect Password:="4567"
       .Range("K12").Value = R
       .Protect Password:="4567", UserInterfaceOnly:=True, AllowFiltering:=True
     End with
  
       CONJ3 = Array("Jan " &amp; R, "Feb " &amp; R, "Mar " &amp; R, "Apr " &amp; R, _
           "Mai " &amp; R, "Jun " &amp; R, "Jul " &amp; R, "Aug " &amp; R, "Set " &amp; R, _    
           "Oct " &amp; R, "Nov " &amp; R, _"Dec " &amp; R, "MS3", "MS4", "MS5")
  
     With Worksheets("CONJ3")
       .Unprotect Password:="4567"
       .Visible = xlSheetVeryHidden
       .Protect Password:="4567", UserInterfaceOnly:=True, AllowFiltering:=True
     End With
  </code></pre>
  
  <p><strong>[QUESTION 2]</strong> I have now some issues with run-time error9:subscript out of range (possible array error). How to fix it?</p>