Article ID: 241932 - Last Review: May 11, 2006 - Revision: 3.0

PRB: Run-Time Error 13 While Running Visual Basic DHTML Applications

This article was previously published under Q241932

On This Page

Expand all | Collapse all

SYMPTOMS

When running Visual Basic Dynamic HTML (DHTML) Projects on machines with Internet Explorer 5 or later installed, the following error message appears:
Run-time error '13':
Type mismatch
This error occurs while calling PutProperty or GetProperty functions generated by the default template of Visual Basic.

CAUSE

The first parameter of the above two functions is of type HTMLDocument and BaseWindow.Document cannot be passed to it.

RESOLUTION

Change the first parameter of the PutProperty and the GetProperty declaration objDocument As HTMLDocument to objDocument As Object. As in the following example:
Public Sub PutProperty(objDocument As Object, ....)
				

MORE INFORMATION

Steps to Reproduce Behavior

  1. On a computer with Internet Explorer 5 installed, run Visual Basic 6.
  2. Select a new DHTML Application template.
  3. On the default DHTMLPage designer (DHTMLPage1), add the following code in Document_onclick.
    PutProperty BaseWindow.Document, "SomeName", "SomeValue"
    					
  4. Run the application.
  5. Click on the document.

REFERENCES

For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
http://msdn.microsoft.com/ie/ (http://msdn.microsoft.com/ie/)

http://support.microsoft.com/iep (http://support.microsoft.com/iep)
For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:
190249  (http://support.microsoft.com/kb/190249/EN-US/ ) INFO: VB 6.0 Readme Part 9: DHTML Page Designer Issues
190050  (http://support.microsoft.com/kb/190050/EN-US/ ) PRB: BuildFile Property of DHTML Application Is Missing

APPLIES TO
  • Microsoft Visual Basic 6.0 Learning Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 6.0 Enterprise Edition
  • Microsoft Internet Explorer 5.0
Keywords: 
kbbug kbmshtml kbprb KB241932
 

Article Translations

 

Related Support Centers