I have a sub that works to clear values from a userform textbox but I tried to convert it to a function so I can use it with multiple userforms.
Here's my userForm Code (the command button code)
Private Sub pdclear_Click()
Dim passform As UserForm
Set passform = NoteEntryForm1
Dim inputtext As TextBox
Set inputtext = frmBigInputBox
Call clear(passform, inputtext)
End Sub
Here is my function
Function clear(passform As UserForm, inputbox As TextBox)
passform.inputbox.Value = vbNullString
End Function
Trying to execute returns "Type missmatch" error.
I set it as a userform and a textbox. What am I doing wrong?
thank you :)