PRB: "User-Defined Type Not Defined" Error with Shdocvw.dll Enum (193083)



The information in this article applies to:

  • Microsoft Visual Basic Learning Edition for Windows 6.0
  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0

This article was previously published under Q193083

SYMPTOMS

When you run code that uses the BrowserNavConstants or RefreshConstants enumeration variables (Enums) on a computer that has Internet Explorer 4.x installed, you receive the following error message:
Compiler error:

User-defined type not defined

However, the same code works on a computer that has Internet Explorer 3.x installed.

CAUSE

The BrowserNavConstants and RefreshConstants Enums are found in the older versions of Shdocvw.dll that shipped with Internet Explorer 3.x. However, the newer versions of Shdocvw.dll that come with Internet Explorer 4.x (and Visual Studio 6.0) do not contain those Enums.

Therefore, the following code will work on a machine with Internet Explorer 3.x:
   Dim x As BrowserNavConstants
				

However, if you compile the code on a machine with either Visual Studio 6.0 or Internet Explorer 4.x installed, you will get the "User-defined type not defined" error message.

Modification Type:MajorLast Reviewed:5/13/2003
Keywords:kbBug kbCompiler kbnofix kbprb kbWebBrowser KB193083