UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Browser Control. Jvm Error Not Loaded?    
 
   
champagne_charly
post Jun 2 2013, 01:38 PM
Post#1



Posts: 477
Joined: 31-January 05
From: Blackheath, London


Hello,
oping somebody here can help.
I have been trying to use mshtml in VBA to scrape data from a webpage but with major stability issues. I then tried with vb6 but still stability issues.
I therefore decided to try using a webcontrol and see whether it was more stable.. however i am not even able to load the page properly. The error is JVM not loaded but that error is coded within the page.
the link for the html is as follows: https://www.dropbox.com/s/4unly4jzxm01j1u/2...20-%20Copy.html
The code behind then form is as follows.. the only thing the form contains is the browser control:
CODE
  Dim WithEvents Web_V1 As WebBrowser_V1
                        
                        
      Private Sub Web_V1_NewWindow(ByVal URL As String, _
                                   ByVal Flags As Long, _
                                   ByVal TargetFrameName As String, _
                                   PostData As Variant, _
                                   ByVal Headers As String, _
                                   Processed As Boolean)
         Processed = True
         MsgBox URL
        WebBrowser1.navigate URL
        
      End Sub
        
Private Sub Form_Load()
    Dim UrlDir As String
    UrlDir = "http://127.0.0.1/bankstats/encrypted/"
    
        Dim URL As String
    Dim FileName As String
        Dim DecryptedFilePath As String
        FileName = "2012-10-03 12-15securedoc.html"
140             localFilePath = localDir & "\" & FileName
150     DecryptedFilePath = DecryptedDir & "\" & FileName
URL = UrlDir & "\" & FileName
'URL = "http://whatsmyuseragent.com/"
'URL = "www.netdania.com"
URL = "D:\Documents\work\FilesToImport\BankStats\encrypted\" & FileName
          Dim htmlDoc As MSHTML.HTMLDocument    ' html object lib
          Dim htmlInput As MSHTML.HTMLInputElement
          Dim htmlDiv As MSHTML.HTMLDivElement
          Dim htmlColl As MSHTML.IHTMLElementCollection
          Dim StartTime As Date
          Dim msg As String
      Set Web_V1 = WebBrowser1.Object
      WebBrowser1.Navigate2 URL
End Sub

Could somebody please try and see if it works? and if not how to get around?
Go to the top of the page
 
champagne_charly
post Jun 2 2013, 05:23 PM
Post#2



Posts: 477
Joined: 31-January 05
From: Blackheath, London


Fixed.. Issue = compatibility of webbrowser component by default is ie7.
egistry fix : Discussed here
Go to the top of the page
 
CyberCow
post Jun 2 2013, 07:19 PM
Post#3


UdderAccess Admin + UA Ruler
Posts: 19,555
Joined: 27-April 02
From: Upper MI


champagne_charly - thanks for posting back with the solution! Glad you found it. hat_tip.gif
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    12th December 2017 - 03:00 PM