Solved

How to get methods / properties / values of an object

Posted on 2004-08-31
2
213 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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…
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.
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…
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…
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

631 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