Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

[RESOLVED] Compatible method for InternetExplorerMedium

$
0
0
I'm porting code from VBA to VB. VB does not seem to recognize InternetExplorerMedium. What is the correct code to use in place of InternetExplorerMedium? Below is my browser code.

Code:

Public Function LoadBrowser() As Boolean

    Dim bStatus As Boolean
   
    'Handle any erros we may have cleanly
    On Error GoTo Err_Hndlr
   
'    AbortRun = False
   
    If (bDoDebug) Then
        Debug.Print ("clsIIE [LoadBrowser Enter]")
    End If
   
    Set m_oBrowser = New InternetExplorerMedium
'    Set m_oBrowser = New InternetExplorer
    UpdateProgressBar
    Sleep (200)
   
    'Assume success
    bStatus = False
   
    'Initially keep the Browser hidden
    m_oBrowser.Visible = False
    DoEvents
   
    'Navigate to URL
    m_oBrowser.navigate cURL_IE
    BrowserWait
    UpdateProgressBar
   
    Sleep (100) 'disabled
   
    'Now let's display the window
    m_oBrowser.Visible = True
   
   
Clean_Exit:

    If (bDoDebug) Then
        Debug.Print ("clsIIE [LoadBrowser Exit]")
    End If
   
    LoadBrowser = bStatus
   
    Exit Function

Err_Hndlr:


Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>