I had a code, which was running perfectly fine yesterday, but now it stopped working and throwing this error:
I have checked my references, and my activeX box is checked:
I am really stuck. What am I doing wrong? Do I need to update something?
This type of error typically emerges after adding Option Explicit at the top of a module, or after pasting working code without explicitly defined variables into a new module with Option Explicit at the top.
Go to Tools > Options > Editor Tab and see if the checkbox for "Require Variable Declaration" is ticked. This is what Option Explicit does.
Dim objMyConn. "Something" changed since yesterday. If you're not sure, compare to your backup copy (hint hint) :-)Option Explicitat the top of the module...Option Explicitat the top. My guess is you that pasted existing code into another module today. Anyway, case closed and happy coding.