Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: VB and ShDocVW.InternetExplorer


Message #1 by "Joe Hagerty" <joeh@t...> on Tue, 27 Aug 2002 09:34:27 -0700
Automation error usually indicates that the class cannot automatically 
allocate its own memory.  If the debug points to:
   Set Doc =3D Web.document
try using:
   Set Doc =3D CreateObject("Web.Document")
OR
   Set Doc =3D New Web.Document
if you are not creating a transactional class and don't need the SharedProp
ertyManager to be available.

  Hope this helps,
     -- Stu

Stuart Thompson
thompson_stuart@s...

"The difference between genius and stupidity is that genius has its 
limits"

>>> joeh@t... 08/27/02 10:30AM >>>
Yeah still get

Run-Time Error '-2147467259 (80004005)'
Automation Error
Unspecified Error

Debug points to:

Set Doc =3D Web.document

-----Original Message-----
From: Jack Dunstan [mailto:jdunstan7@h...]
Sent: Tuesday, August 27, 2002 9:08 AM
To: professional vb
Subject: [pro_vb] Re: VB and ShDocVW.InternetExplorer


Hi Joe,

Did you try

   Set Web =3D New SHDocVw.InternetExplorer

just before you Web.navigate http://altavista.com/   ?

I ran it with the set and it worked fine.

hth
Jack



----- Original Message -----
From: "Joe Hagerty" <joeh@t...>
To: "professional vb" <pro_vb@p...>
Sent: Tuesday, August 27, 2002 12:34 PM
Subject: [pro_vb] VB and ShDocVW.InternetExplorer


> I am needing to access the DOM object in VB using either INet or
> ShDocVW.InternetExplorer.  but it is dying.  Here is the code I am
> attempting to use:
>
>
> Public Function Test() as String
>    Dim Web As New SHDocVw.InternetExplorer
>    Dim Doc As New MSHTML.HTMLDocument
>
>    Do Until Web.Busy =3D False
>       DoEvents
>    Loop
>
>    Web.navigate "http://altavista.com/"
>
>    Set Doc =3D Web.Document
>
>    Test=3D Doc.Title
>
>    Set Web =3D Nothing
> End Function
>
> The code breaks on Set Doc=3DWeb.Document with an Object autmation 
error.
> This code works fine from within a VBA module in Access however.  I have
> verified my references are correct (HTML Controls(MSHTML.TLB) and 
Internet
> Browser (shDocVW.dll)
>
> Any suggestions would be greatly appreciated.
> Thanks
>
> Joseph Hagerty
> Head Geek
> Tentmakers Missionary Fellowship
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
>
>
>
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills
> from Visual Basic 6 to C#, the language of choice
> of the .NET Framework.
> http://www.wrox.com/ACON11.asp?ISBN=3D1861007175&p2p0059
>
>


---
Visual C# - A Guide for VB6 Developers
This book will make it easy to transfer your skills
from Visual Basic 6 to C#, the language of choice
of the .NET Framework.
http://www.wrox.com/ACON11.asp?ISBN=3D1861007175&p2p0059


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002



---
Visual C# - A Guide for VB6 Developers
This book will make it easy to transfer your skills
from Visual Basic 6 to C#, the language of choice
of the .NET Framework.
http://www.wrox.com/ACON11.asp?ISBN=3D1861007175&p2p0059



  Return to Index