title: How to call a function that requires a value on the click of a programmatically added button in VB?
body: <p>I need to call a function and return the text of the button that is added though the button is programmatically added. For example</p>
  
  <pre><code>AddHandler button.Click, AddressOf function(value)
  </code></pre>
  
  <p>Thought that isn't possible because of the following reason:</p>
  
  <blockquote>
    <p>Error 1   'AddressOf' operand must be the name of a method (without parentheses).</p>
  </blockquote>