Link to home
Start Free TrialLog in
Avatar of dbrckovi
dbrckoviFlag for Croatia

asked on

Get CreateObject (....) properties, and methods.

Hi!

Example:     Set IE = CreateObject("InternetExplorer.Application")

How do I get names of properties and methods of IE object?

The only way I know how to get them is to google, and hope objects are documented.    
For example: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp

But I want to know how I can get those names without having to depend on documentation.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of MaximKammerer
MaximKammerer
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Marv-in
Marv-in

you cant get the properties when create an object at runtime at design time.

if you add the Microsoft Internet Controls control you can use F2 to browse all the properties for reference.
If you early bind it, you would then get Intellisense.
Create a reference to shdocvw.dll and instead of

    Dim IE AS Object
    ...
    ...
    Set IE = CreateObject("InternetExplorer.Application")
    ...
    ...

use

    Dim IE As InternetExplorer
    ...
    ...
    Set IE = New InternetExplorer
    ...
    ...
when you create the IE instance like this:

Dim IE as Variant

Set IE = CreateObject("InternetExplorer.Application")


you are using what is known as LATE BINDING, so that you are actually creating the specific object at RUNTIME.  As sunce, the Compiler has no clue whatsoever, what KIND of thing you are going to create until you actually create it (AT RUN-TIME).  Thus, it is not possible for intellisense (which exposes the methods and properties of the objects that you declare in your code) to know, beforehand, what could possibly be the methods and/or propertoies of the IE object that you have declared in your code.  In order to get Intellisense, you MUST use EARLY BINDING - that is, declare the IE object as a REAL type, so the compiler can look at the TypeLib, and expose the properties and methods found there, BEFORE the program is compiled or executed.

AW
Avatar of dbrckovi

ASKER

Thanks MaximKammerer!
This is exactly what I wanted. If it would only have some search option, it would be perfect.