PRB: IE Reports Unknown Type .VBD for ActiveX Document

Last reviewed: March 3, 1998
Article ID: Q167380
The information in this article applies to:
  • Microsoft Visual Basic Professional and Enterprise Editions for Windows, version 5.0
  • Microsoft Internet Explorer, versions 3.0, 3.01, 3.02, 4.0, 4.01

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:

  1. You are using the wrong .VBD file.

  2. You are using an out-dated .VBD file.

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

  4. The ActiveX EXE/DLL is not registered properly.

  5. Visual Basic Run-time is not installed or on the path.

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

  7. Runtime error in initialization code of ActiveX Document.

  8. Cab files are not being downloaded.

  9. Other problems that occur.

RESOLUTION

  1. 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.

  2. Using an out-dated .VBD file:

    The CLSID must be same in the xxx.htm, xxx.vbd, 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:

        - Select the Project menu and the Project Properties items.
    

        - Select the component tab and select Binary Compatibility, under
          version compatibility.
    

        - 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 IE 3.0x on the client machine sees it is trying to register a different CLSID for the same ProgID, it will create a conflict.X directory under Occache 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.

  3. 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.

  4. 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.

  5. Visual Basic Run-time is not installed or is not on the path:

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

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

    Changing the security setting to Medium in the security page of the property settings for IE 3.x may resolve this problem. When you go to the security page, there is Safety Level button where you can change the setting from High to Medium. Once you have changed the security level, you should get messages indicating that a potential security problem exists. Accept all the warnings and your ActiveX Document should work.

  7. 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:

        - Private Sub UserDocument_Initialize()
    

        - Private Sub UserDocument_InitProperties()
    

    For debugging purposes, put just a MsgBox "In routine XXX" in the above Subs of your ActiveX Document project. This will provide you with some status of the download.

  8. Cab 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 IE with High security setting, the files will not be installed on their client machine and the ActiveX Document will not run, yielding the error this article is referring to.

    For testing purposes, putting the CAB files shipped on the Visual Basic 5.0 CD-ROM on your WWW/Local server for debugging may be helpful, but be aware that these files have no digital signature. To see what CAB files are being downloaded for your project, open the .inf file that is created for your project by Setup Wizard.

    To change the download location while running Setup Wizard:

        - Make sure you select "Use alternate location" from the Run-time
          Components window.
    

        - Use a fully-qualified path or leave the field blank. If you leave the
          field blank, make sure you put the CAB files in the download
          directory of your project on the server.
    

  9. Other problems that occur:

    A. Set IE 3.0x security to Medium or None.

    B. 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 the Project Properties items.
    

          2. Select the make tab.
    

          3. Under "Version Number," update the version number manually or
    
             choose the "Auto Increment" check box.
    
       C. Always close and re-open I/E between component download attempts to
          avoid caching the old page.
    
       D. For referencing remote objects, use CreateObject for debugging.
    
       E. Make your ActiveX Doc an EXE rather than a DLL for debugging.
    
       F. Make sure you are using the latest versions of the controls and DLL's
          that ship with Visual Basic 5.0 in your ActiveX Document. You should
          use MSFlxGrd.ocx that ships with Visual Basic 5.0 instead of
          Grid32.ocx.
    
       G. 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
          IE 3.0x on your system. This will minimize the chances of a file
          being loaded that your ActiveX Document needs to download.
    
    

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Keywords          : vb5all kberrmsg kbsetup
Technology        : kbInetDev kbole
Version           : 5.0
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 3, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.