Results 1 to 3 of 3

Thread: Automation Error help needed

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2001
    Location
    Singapore
    Posts
    24
    I'm using a gobal mouse hook, whenever there is mouse click, CaptureData () method will be called. The problem comes when i try to do something to the objIE1, i get a Runtime error '-2147417843(8001010d)' Automation Error. What did i do wrong?


    Public Sub CaptureData()
    Set objShellWins = New SHDocVw.ShellWindows

    On Error GoTo cap

    Dim objIE1 As SHDocVw.InternetExplorer


    If isForegroundIE = True Then
    Debug.Print "Current is IE"

    For Each objIE1 In objshellwindows
    'this is the code that gives mi error
    Debug.Print objIE1.hwnd

    Next objIE1

    Exit Sub
    cap:
    Debug.Print Err.Number & " " & Err.Description
    End If
    End Sub

  2. #2
    Lively Member Bios's Avatar
    Join Date
    Nov 1999
    Location
    Richton Park, IL, USA
    Posts
    71
    try using:

    on error resume next

    and seeing if it can just skip over ther error, and still work.

    Seems like it might work,
    Bios
    Age: 17
    Languages: (Q)BASIC, Visual Basic, Dark Basic,C/C++, Visual C++, Perl, Java Script, HTML, ASP

    "DO:BEEP:LOOP"

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2001
    Location
    Singapore
    Posts
    24
    Yes it works, thanks, but doesnt really solve my problem© I'm trying to loop through ShellWindows to check which Internet Explorer handle is equal to the foregroundWindow handle then assign objIE to it© The moment i try to do something with the objIE, i get an automation error© How can i solve this??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width