Solved

Returning types of members using the VB IDE

Posted on 2002-07-12
7
150 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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 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…

773 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