I created a function to check if there is a control type in my form or not, but It didn’t worked and I don’t know where is the problem.
This is the code I wrote:
Private Function testIfControlExists(ByVal _Control As Control)
For Each c As Control In Me.Controls
If TypeOf c Is _Control Then
Return True
End If
Next
Return False
End Function
This is the error message I get:
Error 1 Type ‘_Control’ is not defined.
If you want to check if the Form has the control type then you can do this: