title: Excel VBA: Selecting a checkbox whose name is in a cell
body: <p>I have a list of of checkbox names as text in cells (column C) and i want to save that name to ChkB and then link the cell to the checkbox. When ever i run this i get an "invalid use of property" error at the ChkB= line. I tried looking this up and i'm not finding anything helpful. Hoping someone can help me out. </p>
  
  <p>**Updated line 4.. now i have a new error on line 5 "Method or data member not found"<br>
  ** P.S. i thought i should mention i'm using VBA in a word doc to edit an excel file.
  Perhaps this effects the LinkedCell command? (it is referencing the worksheet so it knows to do this bit in excel)<br>
  ** Updated again... on the line where i set ChkB, i'm getting a type mismatch error<br><br></p>
  
  <pre><code> Dim ChkB As CheckBox
  
   For k = 2 To 9
              Set ChkB = Sheets("SheetA").Shapes(Range("C" &amp; k).Value)
              .LinkedCell = "C" &amp; k
   Next k
  </code></pre>
  
  <p><br><br>
  UPDATE: Solved it. Thanks Tim Williams</p>
  
  <pre><code>Dim ChkB As CheckBox
  Dim e as string
  
  For k = 2 To 9
          e = Range("C" &amp; k).Text
          Sheets("SheetA").Checkboxes(e).LinkedCell = "SheetA!C" &amp; k
  Next k
  </code></pre>