How to User a existed Control as a parameter of a function?
Posted on 2002-05-20
I write a function, the type of one of the parameter is ComboBox , like this:
Private Sub AddDataToList(ByRef cmbTarget As ComboBox, ByRef strSql As String)
But How can I use a existed Control as a parameter when use this function? for example. I have a ComboBox in the form named cmbTypes, when I use it as "call AddDataToList(cmbTypes, strSql)", the compiler warns me with the message "the cmbTypes is not the name of a variable". How can I do?