?
Solved

how to make a list of references in vb6 project

Posted on 2015-02-01
14
Medium Priority
?
96 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
[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
  • 6
  • 6
14 Comments
 
LVL 49

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 49

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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 

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 49

Accepted Solution

by:
Martin Liss earned 1500 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 49

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 49

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 49

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

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

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…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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 …
Suggested Courses

762 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