Solved

how to make a list of references in vb6 project

Posted on 2015-02-01
14
84 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 46

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 46

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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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 46

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
 

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 46

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 46

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 46

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
allswap challenge 6 96
Problem to event 3 92
VBA: Select SQL query based on a config Sheet v2 11 44
Can we place a tooltip on the actual vb6 form 5 41
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
This video teaches viewers about errors in exception handling.
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 …

815 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

11 Experts available now in Live!

Get 1:1 Help Now