I'm new to VBA and I can't find a solution to this: I'm trying to write a function to clear a ComboBox, a ListBox and a TextBox, but I get the
Run time-error 13: Type Mismatch error
and I can't understand why.
I'm using the ActiveX controls.
'sub for resetting
Sub Cancella(testo As TextBox, lista As ListBox, user As ComboBox)
testo.Text = ""
lista.Clear
user.Clear
End Sub
Sub CommandButtonReset_Click()
'Button locaed in an excelSheet called "Giustificativo"
'InputNumero1 is an textBox in "giustificativo
'ListArticoli1 is a listobx (same sheet)
'ComboBoxUtenti is a comboBox (ame sheet)
Call Cancella(InputNumero1, ListArticoli1, ComboBoxUtenti)
End Sub
I'm doing something wrong or it's something that it' not possible to do altogether? Thank you very much!