title: How do I get checkbox value in a sheet?
body: <p>I have multiple checkboxes called cBox1, cBox2 etc in a sheet called 'Images'.</p>
  
  <p><a href="https://i.stack.imgur.com/K6Z7m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K6Z7m.png" alt="enter image description here"></a></p>
  
  <p>I have three sheets: Data Table, Images, Data (respectively). <code>Images</code> contains two images with various checkboxes, a textbox and a button. When I click the button, the code gets value from the textbox and checkboxes and insert values into a table in the <code>Data</code> sheet.</p>
  
  <p>I am trying to get whether a checkbox is checked or not with the below code:</p>
  
  <pre><code>If ThisWorkbook.Worksheets(2).Shapes("cBox1").OLEFormat.Object.Value = 0 Then
      totalOfWeldsInOrder = totalOfWeldsInOrder + 1
      s1 = 0
      notInOrder = True
  End If
  </code></pre>
  
  <p>However, the value never changes.</p>
  
  <p>How can I get the checked value of the checkboxes?</p>
  
  <p>I have also tried the below, with no success:</p>
  
  <pre><code>If ThisWorkbook.Worksheets(2).Shapes("cBox1").OLEFormat.Object.Value = -4146 Then
      totalOfWeldsInOrder = totalOfWeldsInOrder + 1
      s1 = 0
      notInOrder = True
  End If
  </code></pre>
  
  <p>And Also</p>
  
  <pre><code>If Sheet2.Shapes("cBox1").ControlFormat.Value = xlOff Then
     ......
  End If
  </code></pre>
  
  <p>EDIT:</p>
  
  <pre><code>If ThisWorkbook.Worksheets(2).cBox1.Value = 0 Then
      totalOfWeldsInOrder = totalOfWeldsInOrder + 1
      s1 = 0
      notInOrder = True
  End If
  </code></pre>
  
  <p>returns:</p>
  
  <p><a href="https://i.stack.imgur.com/e70cu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e70cu.png" alt="enter image description here"></a></p>