PRB: IE Reports Unknown Type .VBD for ActiveX Document

ID: Q167380


The information in this article applies to:
  • Microsoft Visual Basic Professional and Enterprise Editions for Windows, versions 5.0, 6.0
  • Microsoft Internet Explorer


SYMPTOMS

There are problems with ActiveX Documents that will be used on a Web server. The ActiveX Document works fine on the development computer but fails on computers that try to access it over the Internet. The following message sometimes appears:

"Internet Explorer is opening file of unknown type:
<Name of Document>.VBD from"


CAUSE

This problem behavior can occur because:

  • You are using the wrong .vbd file.


  • You are using an out-dated .vbd file.


  • The Actxprxy.dll is missing or is not registered properly.


  • The ActiveX EXE/DLL is not registered properly.


  • Visual Basic run-time is not installed or on the path.


  • The ActiveX Document may not be signed or safe for scripting.


  • Run-time error in initialization code of ActiveX Document.


  • Dependent files are not being downloaded.


  • Other problems that occur.



RESOLUTION

Using the wrong .vbd file

Use the xxx.vbd that is created for you by the Visual Basic Setup Wizard. The Setup Wizard will create a directory of all the files needed for a successful Internet download. Use the files created by Setup Wizard. Do not mix and match these files from other versions on your machine because you will run compatibility issues.

Using an out-dated .vbd file

The CLSID must be same in the xxx.vbd, xxx.htm (if used), and xxx.exe files of your ActiveX Document project. CLSIDs getting out of synchronization is one of the most common sources of errors for Visual Basic ActiveX Documents. By default, Visual Basic 5.0 creates a new CLSID (and new registry entries) every time you remake your project. Most likely, you will not want this to occur. To preserve the CLSID across builds, do the following:
  1. From the Project menu, choose Project Properties.


  2. Select the component tab and choose Binary Compatibility, under version compatibility.


  3. In the text box below that selection, put the DocObject (the .exe or .dll, depending upon the ActiveX Document) file name of your project.


If you didn't set Binary Compatibility and rebuild (or directed SetupWiz to rebuild) the project, Visual Basic generated a new CLSID for the same ProgID. When downloading, if Internet Explorer on the client computer sees it is trying to register a different CLSID for the same ProgID, it will create a conflict.X directory under Occache or "Downloaded Program Files" directory. To avoid this problem of the conflict.X directory being created, you need to set Binary Compatibility on your ActiveX Document project unless the project is not backwards compatible.

The Actxprxy.dll Is Missing or Is Not Registered Properly

If ActiveX DLL works but ActiveX EXE does not, then actxprxy.dll is probably missing or not registered properly. This file is installed by IE3.0X and should be registered. If not, use regsvr32 to register actxprxy.dll.

ActiveX EXE/DLL Is Not Properly Registered

If your ActiveX Document does not show up if you add the .vbd file to Office Binder by selecting the menu item "Section," then item "Add from File," then there is a registry problem or the DocObject can't instantiate. If you can add the .vbd file to Binder, then the .vbd file has the wrong CLSID. Try recompiling and using the .vbd file that is created.

Visual Basic Run-Time Is Not Installed Or Is Not on the Path

Make sure MSVBVM50.DLL is correctly installed on your computer.

The ActiveX Document May Not Be Signed

Changing the security in Internet Explorer may resolve this problem. If your server is not signed, you will need Medial level safety for Internet Explorer 3.x and Low for 4.x and higher. Check the Internet Explorer Online help for more details.

Run-Time Error in Initialization Code of ActiveX Document

Make sure you do run-time error checking in your ActiveX Document project. You will have problems if you have a run-time error in either of the following routines. If a run-time error occurs while in this routines, Internet Explorer will display the above-mentioned error message rather than the actual error message in your code:
  • Private Sub UserDocument_Initialize()


  • Private Sub UserDocument_InitProperties()


It is recommended that you do not use the Initialize event because it can fire multiple times under Internet Explorer. Additionally, when the Initialize event fires, the document is not fully sited in Internet Explorer. It is recommended that you use the Show event.

Dependent files are not being Downloaded

The inability to download dependent files could also cause this error. Visual Basic provides its core-dependent CAB files on the Visual Basic 5.0 CD-ROM in the \\Tools\Cabinets directory. It is important to note that these files are not digitally signed. If users are running Internet Explorer with a High security setting, the files will not be installed on their client computer and the ActiveX Document will not run, yielding the error to which this article refers.

The signed versions of these CAB files are available from the Microsoft Web site specified by default in your Internet Component Download (see the generated .inf file for exact name).

You can also download and place these CAB files on your own server. Here is how you can accomplish that:
  • Download the desired CAB file by typing the entire CAB file URL (from the .inf file) in the address bar of Internet Explorer. Internet Explorer prompts you to Open or Save the CAB file. Save the CAB file on your Web server.

    NOTE: Do not attempt to change file date, time or any other attributes since doing so will invalidate the signature.


  • While creating Internet Component Setup, specify that files be downloaded from your Web server instead of Microsoft Web site.


Other Problems that Occur

  1. Set the Internet Explorer security settings to allow the ActiveX components to download.


  2. Turn on the version number increment in your document project and put the version number in a field so it displays on the main form of your downloaded page. This way you can see whether your project actually downloaded or you are looking at an old version.

    To change the version number for the Active Document project:


    1. Select the Project menu and then choose Project Properties. items.


    2. Select the Make tab.


    3. Under "Version Number," update the version number manually or select the "Auto Increment" check box.


  3. Always close and re-open Internet Explorer between component download attempts to avoid caching the old page.


  4. For referencing remote objects, use CreateObject for debugging.


  5. Make your ActiveX Doc an EXE rather than a DLL for debugging.


  6. Make sure you are using the latest versions of the controls and DLLs that ship with Visual Basic in your ActiveX Document. You should use MSFlxGrd.ocx instead of Grid32.ocx.


  7. Files will not be download if there is a copy of that file loaded in the system. When you are downloading, make sure you are only running Internet Explorer on your system. This will minimize the chances of a File being loaded that your ActiveX Document needs to download.


  8. If the computer requires a proxy server to access the Internet, make sure that you are logged on to it before downloading the ActiveX document.



STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


REFERENCES

Q177269 Internet Explorer 4 Keeps Active Document Servers Running

Additional query words:

Keywords : kbActiveX kbIE kbIE300 kbIE301 kbIE400 kbIE401 kbVBp500 kbVBp600 kbIE302 kbCodeDownload kbInetDev kbIEFAQ
Version : WINDOWS:5.0,6.0; :
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: January 27, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.