Solved

Returning types of members using the VB IDE

Posted on 2002-07-12
7
154 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
[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
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
Independent Software Vendors: 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!

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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.
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…
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…
Suggested Courses
Course of the Month5 days, 5 hours left to enroll

635 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