title: How to pass the string value to function
body: <p>I want to pass the string value to function</p>
  
  <p>Function Code</p>
  
  <pre><code>Private Function Assign(Div As String)
  
          sSQL = "Insert into table2 Select * from table1 Where Divi_Code = '" &amp; Div &amp; "'"
          Rdoconn.Execute sSQL, rdExecDirect
  
  End Function
  </code></pre>
  
  <p>Button Click Code</p>
  
  <pre><code>Dim Div as string
  Div = "Hai,Howareyou"
  Assign Div  'Getting Error as "ByRef arguement type mismatch"
  </code></pre>
  
  <p>The above code is shwoing error as Getting Error as <code>"ByRef arguement type mismatch"</code></p>