dbrckovi
asked on
Get CreateObject (....) properties, and methods.
Hi!
Example: Set IE = CreateObject("InternetExpl orer.Appli cation")
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.
Example: Set IE = CreateObject("InternetExpl
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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("InternetExpl orer.Appli cation")
...
...
use
Dim IE As InternetExplorer
...
...
Set IE = New InternetExplorer
...
...
Create a reference to shdocvw.dll and instead of
Dim IE AS Object
...
...
Set IE = CreateObject("InternetExpl
...
...
use
Dim IE As InternetExplorer
...
...
Set IE = New InternetExplorer
...
...
when you create the IE instance like this:
Dim IE as Variant
Set IE = CreateObject("InternetExpl orer.Appli cation")
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
Dim IE as Variant
Set IE = CreateObject("InternetExpl
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
ASKER
Thanks MaximKammerer!
This is exactly what I wanted. If it would only have some search option, it would be perfect.
This is exactly what I wanted. If it would only have some search option, it would be perfect.
if you add the Microsoft Internet Controls control you can use F2 to browse all the properties for reference.