Solved

How to get methods / properties / values of an object

Posted on 2004-08-31
2
206 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

759 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

20 Experts available now in Live!

Get 1:1 Help Now