?
Solved

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

Posted on 2011-09-29
13
Medium Priority
?
1,424 Views
Last Modified: 2012-08-14
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
Comment
Question by:LoGa1234567890
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 2
  • 2
  • +1
13 Comments
 
LVL 13

Expert Comment

by:khairil
ID: 36890222
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
 
LVL 13

Expert Comment

by:khairil
ID: 36890234
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
 

Author Comment

by:LoGa1234567890
ID: 36890646
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 14

Expert Comment

by:Brook Braswell
ID: 36891155
Have you stepped through your code to see on which line you are receiving the error ?
0
 

Author Comment

by:LoGa1234567890
ID: 36891705
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
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 36892686
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
 

Author Comment

by:LoGa1234567890
ID: 36894914
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
 

Author Comment

by:LoGa1234567890
ID: 36895615
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
 
LVL 14

Expert Comment

by:Brook Braswell
ID: 36902879
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
 

Author Comment

by:LoGa1234567890
ID: 36906785
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
 

Assisted Solution

by:LoGa1234567890
LoGa1234567890 earned 0 total points
ID: 36907130
Hi Brook1966,

I forgot to turn on the WIFI switch on that laptop , actually, the problem stay the same.
0
 

Accepted Solution

by:
LoGa1234567890 earned 0 total points
ID: 36914935
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
 

Author Closing Comment

by:LoGa1234567890
ID: 36972772
Accept as solution.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question