Solved

Returning types of members using the VB IDE

Posted on 2002-07-12
7
146 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:midavis
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…

743 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

13 Experts available now in Live!

Get 1:1 Help Now