[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1512
  • Last Modified:

-2147467259 Method '~' of object '~' failed

Hi, Experts,

The following vb6 code run without problem in Xp, Vista home basic, Window 7, but at one laptop, that newly reinstalled back to its factory default window Vista home premium, the error message of "-2147467259 Method '~' of object '~' failed" come up. I had updated the window to its up-to-day , but the error can't be eliminated.
Any idea what is missing or wrong?
Thanks.

Private Sub Command1_Click()
    Text1 = ""
    On Error GoTo Exit1
    Dim IE As Object
    Set IE = CreateObject("InternetExplorer.Application")
    IE.Navigate "http://free.timeanddate.com/clock/i1up141f/n240/tt1/tw0/tm2"
    IE.Toolbar = False
    IE.StatusBar = False
    IE.MenuBar = False
    Do While IE.Busy
        Do While IE.Busy
            DoEvents
        Loop
    Loop
    Text1 = CDate(IE.Document.getElementById("t1").InnerText)
    IE.Quit
    Set IE = Nothing
    Exit Sub
Exit1:
    MsgBox Err & vbCrLf & Err.Description
End Sub

0
LoGa1234567890
Asked:
LoGa1234567890
  • 8
  • 2
  • 2
  • +1
2 Solutions
 
khairilCommented:
Hi,

It is like you have problem with the activex calling. Can you check the IE version on that laptop and compare it with others that runs well?

To zero in the problem, try remove all other references from you VB6 apps, just test the failed function. You also can unistall and reinstall the Internet Explorer on that machine.
0
 
khairilCommented:
You can also run process monitor from sysinternals to know the reason. filter the process monitor to your vb6 apps only and focus on registry monitor so something with NOT FOUND.
0
 
LoGa1234567890Author Commented:
Hi khairil,

Vista usually has IE7 pre-installed. Its version: 7.0.6000.16982.

This pc, newly reinstalled with its factory default window, while running the app above, the IE browser, which was suppressed by all other pcs, pop up and show the date.

The app above doesn't have other code, and I did not add any reference to it.

I suspect the browser has setting issue.
but I don’t have other pc running IE7, they are IE8 or IE9.
I check its internet options against IE8, which has more options than IE7, match it's setting with IE8’s if possible, but the error still there.

I don't get your second message, how to monitor an app running on user machine ?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Brook BraswellApplication Development ManagerCommented:
Have you stepped through your code to see on which line you are receiving the error ?
0
 
LoGa1234567890Author Commented:
Hi Brook,
Using the text1 to note every previous line that run through, it doesn't go through the "DoEvents", that is where the error message come up. The error description is various, sometime show "Automation error, Unspecified error", but the error code stay the same.
0
 
nffvrxqgrcfqvvcCommented:
I would first change your loop code below and change it to the example in code section.

Do While IE.Busy
   Do While IE.Busy
     DoEvents
   Loop
Loop
' Wait for the page to load.
  Do While IE.Busy Or IE.ReadyState <> 4
    DoEvents
  Loop

Open in new window

0
 
LoGa1234567890Author Commented:
Hi egl1044

I tried both your suggestion, but no luck.
I logged more various error message at the "DoEvents"

62
The remote server machine does not exist or is unavailable

-2147023170
Automation error
The remote procedure call failed

-2147023179
Automation error
The interface is unknown

-2147467259
Automation error
Unspecified error

0
 
LoGa1234567890Author Commented:
Hi All,

I need to stress one thing, which I mentioned earlier, after the error message is dismissed, the IE browser show up with the date. This is not happened to other pc, that run the app without error.
0
 
Brook BraswellApplication Development ManagerCommented:
Just for grins...
comment out these lines and see if your error still shows up.

  IE.Toolbar = False
    IE.StatusBar = False
    IE.MenuBar = False
0
 
LoGa1234567890Author Commented:
Hi Brook1966,

I commented out those lines, the problem still there.

Now the IE browser shows up without the date but with the message "Internet Explorer cannot display the webpage".

Others computers continue to work as before with or without those lines.
0
 
LoGa1234567890Author Commented:
Hi Brook1966,

I forgot to turn on the WIFI switch on that laptop , actually, the problem stay the same.
0
 
LoGa1234567890Author Commented:
I solved the problem myself by upgrading the browser to IE8, which I did reluctantly.

I don't like to give this message to the users "Sorry, my application can not run with IE7, please upgrade your browser ! "
0
 
LoGa1234567890Author Commented:
Accept as solution.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 8
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now