BUG: Type Mismatch Error When Calling ShowBrowserBar Without Optional Parameter (251135)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 4.0
- Microsoft Internet Explorer (Programming) 4.01
- Microsoft Internet Explorer (Programming) 4.01 SP1
- Microsoft Internet Explorer (Programming) 4.01 SP2
- Microsoft Internet Explorer (Programming) 5
- Microsoft Internet Explorer (Programming) 5.01
- Microsoft Internet Explorer (Programming) 5.5
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q251135 SYMPTOMS
Calling the InternetExplorer object's ShowBrowserBar method without the optional second parameter (pvarShow) produces the following error message:
Run-time Error '13':
Type Mismatch
The same error occurs if Null (or 0 or vbNull or vbNullString) is used for the second parameter.
CAUSE
ShowBrowserBar does not check for the variant types VT_ERROR and VT_NULL (passed by a missing parameter and the Visual Basic keyword Null, respectively) when determining the validity of the pvarShow parameter.
RESOLUTION
The second parameter must be present and must be declared as a variant having one of three values: true, false, or empty (an uninitialized variant). Note that passing empty has the same effect as passing true, since the default action is to show the bar.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. REFERENCES
For additional information, please see the following MSDN Web Workshop site:
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbBug kbpending KB251135 |
---|
|