title: How to call public function
body: <p>I have a public function to call default email client.</p>
  
  <pre><code>Public Function OpenEmail(ByVal EmailAddress As String, Optional ByVal Subject As String = "", Optional ByVal Body As String = "") As Boolean
      Dim bAns As Boolean = True
      Dim sParams As String
      sParams = EmailAddress
      If LCase(Strings.Left(sParams, 7)) &lt;&gt; "mailto:" Then _
          sParams = "mailto:" &amp; sParams
  
      If Subject &lt;&gt; "" Then sParams = sParams &amp; _
            "?subject=" &amp; Subject
  
      If Body &lt;&gt; "" Then
          sParams = sParams &amp; IIf(Subject = "", "?", "&amp;")
          sParams = sParams &amp; "body=" &amp; Body
      End If
  End Function
  </code></pre>
  
  <p>Then in Button_click, I put </p>
  
  <pre> OpenEmail("mail@asdf.com", "Subject", Body:=" of my message")</pre>
  
  <p>But I am unable to call the function.  I want to open the client when I click button1
  Thanks</p>