title: Passing text box control to private sub/function
body: <p>I have a series of text boxes that I want to evaluate on form load to change some other elements of the form. Rather than processing them line by line I want to create a function. How can I pass the name of the text box to a function. For example:</p>
  
  <pre><code>Private Sub Form_Load()
  
      Call SetIntialToggleValue(MyTextboxName)
  
  End Sub
  
  Private Sub SetIntialToggleValue(ByRef ControlName As Control)
  
      MsgBox ControlName.Value
  
  End Sub
  </code></pre>
  
  <p>This give me "Object required" error on the MsgBox line. Which makes me think I'm not passing the textbox control properly.</p>