View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Walter Briscoe Walter Briscoe is offline
external usenet poster
 
Posts: 279
Default Early variable type issue

My VBA is Microsoft Visual Basic 6.3, from Excel 2003 (11.6535.6360) SP1
from XP Professional Version 2002 SP3.

I have been convinced to use Option Explicit in VBA.
I have also been convinced to go for early typing. The code below uses
late typing.

I have
Dim IE as Object
Set IE = CreateObject("InternetExplorer.Application")

The Set command changes the type of IE from Object to
Object/WebBrowser2
"Dim IE as WebBrowser2" results in a "Compile error: User-defined type
not defined".

From reading past posts, I think Tools/References... could fix that.

How can I find out where WebBrowser2 comes from?
Is there any Basic code which sets references?
I find Tools/References... a bit opaque.

Ideally, any reference which is not explicitly specified would error.
--
Walter Briscoe