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

前端 未结 21 1273
再見小時候
再見小時候 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:39

    I know this is old, but I had a similar problem and found a fix:

    I had the same issue with a module I ported from Excel into Access, in an unrelated UDF I was dimming 'As Range' but ranges don't exist in Access. You may be using a variable type without having the proper reference library turned on.

    If you have any non-standard dims google them and see if you're missing the reference to that library under tools.

    -E

提交回复
热议问题