I'm very new to VBA so I apologise if the question seems silly: I have set up a UserForm with some controls in it, and created a function called ResetMyField
as per below:
Function ResetMyField(MyField As Object)
If MyField = ProjectReference Then
'do something different and then
End If
MyField.Value = ""
End Function
When I call this function using ResetMyField(ProjectReference)
VBA comes out with a 424 error (Object Required). Should I be declaring MyField
as a different type of variable in the function?
Both the function and the point at which I call it are inside the Userform module.
Any help would be much appreciated.