Solved

How to get methods / properties / values of an object

Posted on 2004-08-31
2
208 Views
Last Modified: 2013-11-26
Looking for a way to get and list all the methods / properties / values of any given object ...

Example binding strings :

GetObject(“WinNT://MyDomain/Idaho,computer”)
GetObject(“WinNT://MyComputer/TestGroup,group”)
GetObject(“WinNT://MyDC/MyDomain/JSmith,user”)
GetObject(“LDAP://cn=Test2,cn=Users,dc=MyDomain,dc=com”)

A listing of the property types available in the WinNT bind string would be nice too (computer,group,user,LanManServe etc.)

Not a VB guru yet, so hope this isn't too confusing ... ask away if you're not sure ...
0
Comment
Question by:Gitcho
2 Comments
 
LVL 22

Accepted Solution

by:
DarkoLord earned 300 total points
ID: 11946065
0
 
LVL 17

Assisted Solution

by:zzzzzooc
zzzzzooc earned 200 total points
ID: 11956420
If you don't have the TypeLibs available to you, you can always check the type of the object and then search MSDN for it (usually documented).

For example...

Private Sub Form_Load()
    Dim objTest As Object
    'late-binding.. no way to know properties/methods (interface) ahead
    'of time...
    Set objTest = CreateObject("InternetExplorer.Application")
    'check it's TypeName.. for IE, it's "IWebBrowser2".. "I" is just for
    '"Interface" which defines the properties/methods...
    MsgBox TypeName(objTest)
    'now.. go to http://msdn.microsoft.com and search for "IWebBrowser2"...
    'you'll come across a link of:
    'http://msdn.microsoft.com/workshop/browser/webbrowser/reference/ifaces/iwebbrowser2/iwebbrowser2.asp?frame=true
    'which documents mostly every property/method..
   
    'better "quit" the IE instance.. :-)
    Call objTest.Quit
End Sub
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now