79760714

Date: 2025-09-10 10:07:28
Score: 2
Natty:
Report link

This error happens to me very often, I m an expert developer and, yes, sometimes no reason for this error.

If you can exclude every type of "real" error as described in the other answers, simply try to comment the variable declaration (in this case: dim SixTables), execute the code and you should get the error "variable not declared". At this point you are sure that your code doesn't contain a double definition.
Uncomment the declaration and execute again: kind of magic - it works!

Generally it happens when you import modules containing the same declaration and you remove one of them.
Example:
Module1 and Module2 contain both a public varX.

Removing (or commenting) one of two, you still receive "ambiguous name".

No reason, simply VBA failure.

Removing both and executing VBA realizes varX is not declared. Now you are in a consistent state.

Set again your declaration and the problem is solved.

Because I m old, I still use Enum construct and in this case this error is quite common.

Reasons:
  • Blacklisted phrase (1): to comment
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Uby One