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?
Join Stack Overflow to learn, share knowledge, and build your career.
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) :-) – ashleedawg Jul 14 '18 at 22:45Option Explicit
at the top of the module... – Miqi180 Jul 14 '18 at 22:51Option Explicit
at the top. My guess is you that pasted existing code into another module today. Anyway, case closed and happy coding. – Miqi180 Jul 14 '18 at 23:16