PC Review


Reply
Thread Tools Rate Thread

add ref to Microsoft HTML Object Library

 
 
=?Utf-8?B?cDNwbHly?=
Guest
Posts: n/a
 
      6th Mar 2007
hi

i am working with VBA, and due to the nature of my project, i am using the
web browser.

if i go to the visual basic editior in excel, select tools, referecnes, and
scroll down and select Microsoft HTML Object Library the code will fire
without a hitch.

however, another user might not have Microsoft HTML Object Library
referenced and when they go to use the routine it will bug out.

so my question is, how can i code it directly into the VBA to reference the
Microsoft HTML Object Library to make sure whoever uses the program doesnt
have a problem

thanks

 
Reply With Quote
 
 
 
 
NickHK
Guest
Posts: n/a
 
      7th Mar 2007
Microsoft HTML Object Library (MSHTML.dll) is the component that renders the
HTML for IE. As such, it should be on all versions of Windows that come with
IE.
However, you may have versioning problems if you write your code on a new
machine and a user has an older version.
The easiset way is write code on a system that has the oldest version you
expect to support.

Otherwise look to late binding:
http://peltiertech.com/Excel/EarlyLateBinding.html

Dim MyHTML As Object
Set MyHTML =CreateObject("MSHTML.<WhichClass>")
'...etc

This page a lot of ways of working with web pages:
http://www.microsoft.com/mind/0898/dom.asp

NickHK

"p3plyr" <(E-Mail Removed)> wrote in message
news:CCC0F6AA-57D5-4433-8AE1-(E-Mail Removed)...
> hi
>
> i am working with VBA, and due to the nature of my project, i am using the
> web browser.
>
> if i go to the visual basic editior in excel, select tools, referecnes,

and
> scroll down and select Microsoft HTML Object Library the code will fire
> without a hitch.
>
> however, another user might not have Microsoft HTML Object Library
> referenced and when they go to use the routine it will bug out.
>
> so my question is, how can i code it directly into the VBA to reference

the
> Microsoft HTML Object Library to make sure whoever uses the program doesnt
> have a problem
>
> thanks
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: HTML Object Library Dick Kusleika Microsoft Excel Programming 0 12th Feb 2009 09:01 PM
Excel VBA & HTML Object Library Binky Microsoft Frontpage 1 12th Feb 2009 05:01 PM
Microsoft 11.0 vs. 12.0 Object Library JK Microsoft Access VBA Modules 8 29th Aug 2008 12:37 AM
Microsoft DA0 3.x Object Library - sql, vba =?Utf-8?B?V2ViRHVkZQ==?= Microsoft Access Queries 6 23rd Sep 2005 12:09 PM
Microsoft DAO 3.6 Object library MD Microsoft Access Forms 1 1st Aug 2003 04:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:21 PM.