Howdy,
I want to pass a control as a parameter to a sub. For example:
Private Sub ShowTotals (ctlTextBox as TextBox) as single
ctlTextBox.Text = 125 * 10
End Sub
Private Sub ShowStuff()
ShowTotals (frmMain.txtTotals)
End sub
As written, this produces a type mismatch when 'ShowTotals' is called. I tried a vanilla "as Control", but had the same results.
Appreciate any help as always.
-Steve-
I want to pass a control as a parameter to a sub. For example:
Private Sub ShowTotals (ctlTextBox as TextBox) as single
ctlTextBox.Text = 125 * 10
End Sub
Private Sub ShowStuff()
ShowTotals (frmMain.txtTotals)
End sub
As written, this produces a type mismatch when 'ShowTotals' is called. I tried a vanilla "as Control", but had the same results.
Appreciate any help as always.
-Steve-