Solved

how to make a list of references in vb6 project

Posted on 2015-02-01
14
78 Views
Last Modified: 2015-02-18
Does anyone have code to list the names and paths of references from within a vb6 project?
0
Comment
Question by:ChristineT
  • 6
  • 6
14 Comments
 
LVL 45

Expert Comment

by:Martin Liss
ID: 40583026
I don't know that you can do that, but if you go into Project|References all the ones that are in use will be shown at the top and clicking on one will show where it is.
0
 

Author Comment

by:ChristineT
ID: 40583101
Thanks Martin,
I know I can do that but was feeling lazy and hoping I could just run a routine to see them all listed. I do that in Access projects and thought it would be real straight forward like it is there.

What I do in Access is iterate through:
For Each ref In Application.References

But I don't now how to get the references of the VB project. It really seems as if it should be totally simple.

Thanks anyway.
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 40583117
I assume that the "App" object(?) is equivalent to Access' "Application" object and if so there is no App.References, or anything close. If you look at the VBP file in Notepad or some other text editor you'll see that there are Reference= entries for the references other than the ones that I assume every VB6 project includes and they are "Visual Basic for Applications", "Visual Basic runtime objects and procedures" and "Visual Basic objects and procedures". I guess you could "hard code" those three in your list and then open the VBP file as a text file and read through it looking for the "Reference=" lines. Other thatthat I'm out of ideas.
0
 

Author Comment

by:ChristineT
ID: 40612649
Thanks for your responses Martin. I do not consider them to be solutions but I do appreciate your time and effort. I do not consider this issue resolved, but since I am getting notifications that I must close this question, I am giving up on the thought that what I want to do is possible and will try to close this thread.
0
 

Author Comment

by:ChristineT
ID: 40613708
I've requested that this question be closed as follows:

Accepted answer: 0 points for ChristineT's comment #a40612649

for the following reason:

I would still like to be able to do what I wanted, but am giving up on this at this point.
0
 
LVL 45

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40612720
I didn't Object to the close request but I did write this little program that I think does what you want. If in fact it does then please click the Request Attention button and ask to have the question reopened. Or just let me know and I can "Object" which will start the reopen process. Or maybe you can still accept my answer (I don't know).
Project-References.zip
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:ChristineT
ID: 40613031
Hi Martin, I just requested to re-open this thread.
Thanks for the VB project. I would like to try it out, but got an error log when I opened the project, and cannot make the exe:
Error Log:
Line 21: Class MSComDlg.CommonDialog of control CommonDialog1 was not a loaded control class.
Line 24: The property name _ExtentX in CommonDialog1 is invalid.
Line 25: The property name _ExtentY in CommonDialog1 is invalid.
Line 26: The property name _Version in CommonDialog1 is invalid.

What do I need to do to get past this?  I really appreciate your help.

Thanks,
Christine
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 40613317
Just to make sure that what I upload works, I downloaded it from post ID: 40612720, expanded the zip file and opened and ran it without problems. That makes me think that you have a problem with your commondialog control. Please see this thread. If that doesn't work you could modify the project to get the path + filename manually from a textbox.
0
 

Author Comment

by:ChristineT
ID: 40613709
Thank you Martin. This is not exactly what I wanted, but it might come in handy some time. I appreciate your help and your patience with me since I am pretty new to using this forum and also VB is not my most usual development environment.
Thank you so much,
Christine
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 40614442
Christine it looks like reopening the question caused your points award to me to be lost. Could you do it again please?
0
 

Author Comment

by:ChristineT
ID: 40614638
Thank you Martin, I really appreciate your help with this. Your solution was not exactly what I was looking for, but I'm sure it will come in handy some time. I modified it a bit and got it working.  I also appreciate your patience and your courtesy. I am pretty new to Experts Exchange and also VB is not my 'usual development environment'. Hopefully I am doing this step correctly :)
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 40614649
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
0

Featured Post

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

Join & Write a Comment

Suggested Solutions

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

758 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

22 Experts available now in Live!

Get 1:1 Help Now