title: Creating a list of ComboBoxes using VBA that update the values of cells specified in the code
body: <p>What I am trying to do is to create a program that adds combo boxes with some options. These options should then, depending on the option selected, change some values in some cells that I specify in code.</p>
  
  <p>This is how I make the combo lists:</p>
  
  <pre><code>Private Sub Workbook_Open()
  
  With Worksheets("Sheet1").Columns("E")
   .ColumnWidth = 25
  End With
  
  For i = 1 To 6
      Set curCombo = Sheet1.Shapes.AddFormControl(xlDropDown, Left:=Cells(i, 5).Left, Top:=Cells(i, 5).Top, Width:=100, Height:=15)
      With curCombo
          .ControlFormat.DropDownLines = 3
          .ControlFormat.AddItem "Completed", 1
          .ControlFormat.AddItem "In Progress", 2
          .ControlFormat.AddItem "To be done", 3
          .Name = "myCombo" &amp; CStr(i)
          .OnAction = "myCombo_Change"
      End With
  Next i
  
  End Sub
  </code></pre>
  
  <p>I want each of the dropdown values trigger the event <code>myCombo_Change</code> and then simply change the cell "D" For example, combo box 3 is located at E3 and I want the "To be done" to clear the cell D3 and the completed to simply store the date (and time) to the cell D3. This should be done for all combo boxes in the E Column. </p>
  
  <pre><code>Private Sub myCombo_Change(index As Integer)
  
  Me.Range("D" &amp; CStr(index)) = Me.myCombo.Value
  
  End Sub
  </code></pre>
  
  <p>This is the code I started thinking about, but I have no idea how to call the event with an integer as the index parameter NOR how to access the cell using said index. </p>
  
  <p>The effect I want is something along the lines of this:</p>
  
  <p><a href="https://i.stack.imgur.com/dgEyA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dgEyA.png" alt="enter image description here"></a></p>