title: Detect Button Press Event on an Excel Sheet MultiPage Form (NOT a VBA MultiPage)
body: <p>I am struggling to figure out how to detect a button press event on a MultiPage form that resides directly on an Excel sheet. In other words, the form is not generated using VBA, it is built directly on the sheet.</p>
  
  <p>I expect the syntax to be something like:</p>
  
  <pre><code>Private Sub MultiPage1_Frame1_CommandButton1_Click()
      Do Stuff
  End Sub
  </code></pre>
  
  <p>However, that doesn't work because I think I also need to specify the page in the MultiPage. For example, a text box on the same form can be accessed via:</p>
  
  <pre><code>MultiPage1.Pages(0).Frame1.TextBox1.Text = "Some Text"
  </code></pre>
  
  <p>Unfortunately, </p>
  
  <pre><code>Private Sub MultiPage1_Pages(0)_Frame1_CommandButton1_Click()
  </code></pre>
  
  <p>gives a Compile error: Expected: identifier with the zero inside (0) selected.</p>
  
  <p>So, how do I convert </p>
  
  <pre><code>MultiPage1.Pages(0).Frame1.CommandButton1 
  </code></pre>
  
  <p>to a Sub name that will detect the button press event?</p>
  
  <p>Thank you!</p>