Improve company productivity with a Business Account.Sign Up


Intranet Application & .VBD File

Posted on 1998-12-29
Medium Priority
Last Modified: 2010-05-03
I am trying to create an active document application that can be downloaded from an intranet server and run in a browser. I have created a CAB file and placed it on the server and everything seems to be OK:

this is my main HTM file to call the VBD Files.

<OBJECT ID="FrmLogon"

Sub Window_OnLoad
      Document.Write "<FRAMESET>"
      Document.Write "<FRAME SRC=""FrmLogon.VBD"">"
      Document.Write "</FRAMESET>"
End Sub

However when im trying to access it from a workstation the BROWSER (IE4) prompt a message :

this is the message:

Title : File Download

Message : You have Choosen to download this file
           FrmLogon.VBD from

       What would you like to do with this file?
    -> Open this file from its current  location          
    -> Save File to disk

(I'm using Visual Basic 5.0 and I'm creating the CAB file using the Application Setup Wizard having selected internet setup.)

what is suppose to be the problem?
Any ideas?
Question by:altec234
  • 2

Accepted Solution

chewhoung earned 400 total points
ID: 1452890
There are a few possibility that affecting this:

PRB: Launching VB5 ActiveX Documents from Internet Explorer
Last reviewed: August 7, 1998
Article ID: Q168431


The information in this article applies to:
Microsoft Visual Basic Professional and Enterprise Editions for Windows, version 5.0

When browsing to an ActiveX Document using Microsoft Internet Explorer, the document will fail to load the associated VBD file correctly. Instead, Microsoft Internet Explorer will display the following message:

   <filename> from <URL>

   Some files can contain viruses or otherwise be harmful to your
   computer. It is important to be certain that this file is from a
   trustworthy source.

   What would you like to do with this file?"

The user is presented with a choice of Opening or Saving the VBD file. If the user selects Open, the Open With window is displayed asking which application should launch the file. None of the applications listed, including Microsoft Internet Explorer, will successfully launch the VBD file.

The Setup Wizard for Microsoft Visual Basic 5.0 creates a set of files to be used for Internet download of ActiveX Documents. These files include a cabinet (CAB), VBD, and a hypertext-markup HTM file.

Unfortunately, without changes to the HTM file, an ActiveX Document will not launch correctly when a user browses to the HTM file using Microsoft Internet Explorer 3.x.

Below is a sample of an original HTM file created using the Microsoft Visual Basic 5.0 Setup Wizard. Following the example, is another sample that shows a working HTM file.

Example 1 - Original HTM File

   <OBJECT ID="SampleDoc1"

   Sub Window_OnLoad
       Document.Write "<FRAMESET>"
       Document.Write "<FRAME SRC=""SampleDoc1.VBD"">"
       Document.Write "</FRAMESET>"
   End Sub

Example 2 - Changed HTM File

   <OBJECT ID="SampleDoc1"
   Sub Window_OnLoad
   End Sub

The changes to the Window_OnLoad procedure allow the VBD file to be launched successfully, thus the ActiveX Document will initialize and display within Microsoft Internet Explorer.
To convert an HTM file created with Setup Wizard, do the following:

Make a copy of your original HTM file.

Open the Original HTM file into Notepad.

Remove the lines in the Window_OnLoad procedure. Make note of the VBD filename on the third line of the procedure.

Place the following code within the Window_OnLoad procedure:

      Sub Window_OnLoad
      End Sub

    where "FILENAME.VBD" must be replaced with the name of your VBD
    (including quotation marks).

Save the HTM file.  


PRB: IE Reports Unknown Type .VBD for ActiveX Document
Last reviewed: August 7, 1998
Article 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, versions 3.0, 3.01, 3.02, 4.0, 4.01

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"

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.

Runtime error in initialization code of ActiveX Document.

Dependent files are not being downloaded.

Other problems that occur.


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:

    - 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 Internet Explorer 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 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 machine.

The ActiveX Document may not be signed:
Changing the securitys 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 above. Check Internet Explorers 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 is fired, 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 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.

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 will prompt 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

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

Other problems that occur:
A. Set the Internet Explorer security settings to allow the ActiveX

      components to download.
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 Internet Explorer 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 DLLs
      that ship with Visual Basic in your ActiveX Document. You should
      use MSFlxGrd.ocx 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
      Internet Explorer on your system. This will minimize the chances of a
      File being loaded that your ActiveX Document needs to download.



Author Comment

ID: 1452891

thanks for your help! it really works!

but will this work also using INFORMIX/Intersolv ODBC installed in my NT Server and the INFORMIX Database server on Other Machine?

pls. help



Expert Comment

ID: 1452892
Sorry, I'm do not know about that.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

595 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question