title: How to check button is clicked in vba
body: <p>i want to check if the button in my userform is clicked, may i know how do i do that ? My ultimate aim is to get the number of times the button is clicked. It is something along the codes, I typed. Thank you for your help. </p>
  
  <pre><code> If CommandButton1_Click = True Then 
   x = x + 1 
   End If 
  </code></pre>