Solved

Returning types of members using the VB IDE

Posted on 2002-07-12
7
148 Views
Last Modified: 2010-05-02
I am trying to make a program to analyze data in all my projects.  For this part I want to analyze all variables to see when objects are being created and destroyed.  Currently I am going through all projects, components, then members.  When I loop through the members I want to get all variables.  I can do this fine.  What i am having problems with is finding what type of variable these member variables are.  Does anyone know how to get what type of variable a member is?
0
Comment
Question by:midavis
7 Comments
 
LVL 2

Expert Comment

by:yongyih
ID: 7151158
try to using TypeName()

Dim temp3 As Integer
temp3 = 3
MsgBox TypeName(temp3)

hope this can help you.
0
 
LVL 2

Expert Comment

by:yongyih
ID: 7151159
you can also pass in a command button name into TypeName to get what type it is.

If it is a command button, it will return CommandButton.
For the example just now, it will return Integer.

Good Luck. ^_^
0
 
LVL 5

Expert Comment

by:jayeshshah
ID: 7151189
for analysing your project in VB you can use the Project analyser tool available on www.aivosto.com.
this tool not only helps you analyse the variables but you can also generate reports based on which u can improve your coding standards.
0
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.

 

Author Comment

by:midavis
ID: 7151496
I can't just do a VarType or TypeName on a variable.  This is not a vb program, this is a vb addin.  I need to use the VB IDE to figure out what type of variable I have.

Also, I am making my own addin.  I dont want to go buy one.  I don't believe Project Analyzer does what I am trying to do.  That is why I am doing this.
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 50 total points
ID: 7151831
Is it a COM add-in?
Maybe this could help:
http://msdn.microsoft.com/msdnmag/issues/1200/TypeLib/TypeLib.asp
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8002401
Hi midavis,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept Richie_Simonetti's comment(s) as an answer.

midavis, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 8095416
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

920 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

12 Experts available now in Live!

Get 1:1 Help Now