Compile throws a “User-defined type not defined” error but does not go to the offending line of code

前端 未结 21 1271
再見小時候
再見小時候 2020-12-14 08:00

Symptoms

This is a symptom specifically when compiling an Excel VBA project. The following error occurs:

User-defined type not defin

21条回答
  •  天涯浪人
    2020-12-14 08:46

    Late Binding

    This error can occur due to a missing reference. For example when changing from early binding to late binding, by eliminating the reference, some code may remain that references data types specific the the dropped reference.

    Try including the reference to see if the problem disappears.

    Maybe the error is not a compiler error but a linker error, so the specific line is unknown. Shame on Microsoft!

提交回复
热议问题