title: How to pass a function for parameter using VB6?
body: <p>How can I do to pass a function by parameter, later to be called in VB6?
  would be something like what I need, can be any of these options:</p>
  
  <pre><code>Private Sub Command1_Click()
  
      Call callMethod(MyPrivateFunction)
      Call callMethod(MyPublicFunction)
      Call callMethod(MyPrivateSub)
      Call callMethod(MyPublicSub)
  
  End Sub
  
  Private Function MyPrivateFunction()
      MsgBox "MyPrivateFunction"
  End Function
  
  Public Function MyPublicFunction()
      MsgBox "MyPublicFunction"
  End Function
  
  Private Sub MyPrivateSub()
      MsgBox "MyPrivateSub"
  End Sub
  
  Public Sub MyPublicSub()
      MsgBox "MyPublicSub"
  End Sub
  
  Public Function callMethod(ByRef func As Object)
      Call func
  End Function
  </code></pre>