Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to get methods / properties / values of an object

Posted on 2004-08-31
2
Medium Priority
?
219 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 1200 total points
ID: 11946065
0
 
LVL 17

Assisted Solution

by:zzzzzooc
zzzzzooc earned 800 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

916 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