title: How to declare custom event in userform using vba
body: <p>I have userform which collects some user input. Now what I'm trying to do, is to declare some event to throw from userform when OK button is clicked. I'm new to vba so I don't know how to do it. Any code or link to tutorial would be greatly appreciated.</p>
  
  <pre><code>Load UserForm1
  UserForm1.Show
  //here I want to capture UserForm1 OK button's click event and read the data
  </code></pre>