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

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

    I've seen this error too when the code stopped at the line:

    Dim myNode As MSXML2.IXMLDOMNode

    I found out that I had to add "Microsoft XML, v6.0" via Tools > Preferences.

    Then it worked for me.

提交回复
热议问题