title: Calling button click event from a sub without knowing the name of the button before running the sub
body: <p>In a <code>Sub</code>, I would like to trigger a <code>Click</code> event. For a given Button, for example <code>ButtonCommand1</code>, I can do this by running the code:</p>
  
  <pre><code>    Sub test()
  
           Call Sheet1.ButtonCommand1_Click
  
      End sub
  </code></pre>
  
  <p>, where <code>ButtonCommand1_Click</code> is a <code>Public Sub</code> written in <code>Sheet1</code>. </p>
  
  <p>However, my problem is that I don't know the name of the Button I would like to click on before running the sub itself. So I would need something like:</p>
  
  <pre><code>    Sub test()
  
           Dim i As Integer
           Dim button As String
  
           i = 'SOMETHING
           button = "ButtonCommand" &amp; i 
  
           Call Sheet1.button_Click
  
      End sub
  </code></pre>
  
  <p>, where, again, the <code>Sub Sheet1.button_Click</code> would already be contained in <code>Sheet1</code> as a <code>Public Sub</code> for all possible <code>i</code>'s.</p>
  
  <p>I have tried several options, namely setting button as an <code>Objec</code>t and playing with the <code>Shapes</code> collection in order to : 
  <code>Set button = shapes.range(Array("ButtonCommand" &amp; i)) AND i</code> also tried to select the correct shape by doing <code>shapes.range(Array("ButtonCommand" &amp; i)).select</code> and then running <code>Application.Click</code>. But Nothing works. Thank you for your help!</p>