title: if cell value 1 then listbox .listindex = value
body: <p>I have the following code: </p>
  
  <p><code>If ws.cells(A,B).value = "1" then .ListBox1.List(.ListBox1.ListIndex,5) = Checkbox.name</code></p>
  
  <p>but it prompts an error and i'm not sure how to fix it</p>
  
  <p>essentially, what i'm trying to achieve is that if the cell (A,B) has a value of 1 then insert a name of the checkbox into listbox, listindex of 5. </p>
  
  <p>all other previous listindexes are added by the following code:</p>
  
  <p><code>.list(.listcount -1, 1) = ws.cells(C,D).value</code></p>
  
  <p><code>.list(.listcount -1,1) = ws.cells (E,F).value</code></p>