Microsoft KB Archive/279668

From BetaArchive Wiki

Article ID: 279668

Article Last Modified on 4/21/2006



APPLIES TO

  • Microsoft Internet Explorer 5.5



This article was previously published under Q279668

SYMPTOMS

In a Microsoft Visual Basic application, when you call the Navigate2 method of the WebBrowser control, and then you pass string variables as parameters, you may receive the following error:

run-time error 5 "Invalid procedure call or argument"

RESOLUTION

To resolve this problem, use variant-type variables instead of strings.

STATUS

Microsoft has confirmed that this is a problem in in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Start Visual Basic.
  2. Create a new Standard EXE project. By default, Form1 is created.
  3. Add a WebBrowser control to Form1, and then add the following code to Form1:

    Sub Form_Load()
        Dim strUrl As String 
        ' To resolve the problem, change to Variant.
        ' For example: Dim strUrl As Variant
    
        strUrl = "http://www.microsoft.com/"
        WebBrowser1.Navigate2 strUrl
    End Sub
                        


REFERENCES

For more information about how to use the WebBrowser control, visit the following Microsoft Developer Network (MSDN) Web site:

For more information about how to develop Web-based solutions for Microsoft Internet Explorer, visit the following MSDN Web sites:

Keywords: kbwebbrowser kbprb kbpending KB279668