Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

web browser control not referenced coreectly

Status
Not open for further replies.

davedoop

Programmer
Apr 12, 2004
8
US
I'm sure this will be an easy fix for you Access gurus out
there. I'm trying to use the web browser control in an
Access 2000 form. I add the control and want to set
properties in VBA. However, when I reference the control
in VBA it only lists generic control properties (like
name, size etc.) If I create a new reference to a web
browser control in VBA, all of the correct properties are
then available (navigate, url, etc.). If I try to set my
newly created reference to the control on the form I get
a 'type mis-match' error. The references in both the VBA
and the Access windows point to the same dll
(c:\winnt\system32\shdocvw.dll) and I've tried re-
registering it in Access, but no luck.

Seems like a cool control to use in my app, if I can just
get past this first hurdle (I am admitting that I haven't
tried to use many ActiveX controls in my apps before).
Any ideas will be greatly appreciated - Thanks, Dave
.

 
You can do it either of 2 ways. Assume the WebBrowser control on your form is named "axMyWeb".

axMyWeb.Navigate "c:\AWordDocument.doc"

or

Dim abc As WebBrowser

Set abc = axMyWeb.Object

abc.Navigate "c:\AWordDocument.doc"

 
Set abc = axMyWeb.Object worked beeeeuuuuteeeefully!
A big tip of the hat to you Fancy!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top