This is my code and it worked fine on all machines.
Yesterday I got a complaint from the users that the cannot run this form, so I ran it in debug mode and I got a message "Run Type Error 13 Type Mismatch".
I changed the line "Dim ctl As Control" to "Dim ctl" and it works fine.
My question is what should I look for when I get this error and how can I reset it to AS Control? I tried changing the variable name but that did not help either.
Thanks in advance for your help!!!
Code:
Dim ctl As Control
For Each [COLOR=red]ctl In Controls[/color]
Code.....
Next
Yesterday I got a complaint from the users that the cannot run this form, so I ran it in debug mode and I got a message "Run Type Error 13 Type Mismatch".
I changed the line "Dim ctl As Control" to "Dim ctl" and it works fine.
My question is what should I look for when I get this error and how can I reset it to AS Control? I tried changing the variable name but that did not help either.
Thanks in advance for your help!!!