• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 106
  • Last Modified:

how to make a list of references in vb6 project

Does anyone have code to list the names and paths of references from within a vb6 project?
0
ChristineT
Asked:
ChristineT
  • 6
  • 6
1 Solution
 
Martin LissRetired ProgrammerCommented:
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
 
ChristineTAuthor Commented:
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
 
Martin LissRetired ProgrammerCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
ChristineTAuthor Commented:
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
 
ChristineTAuthor Commented:
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
 
Martin LissRetired ProgrammerCommented:
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
 
ChristineTAuthor Commented:
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
 
Martin LissRetired ProgrammerCommented:
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
 
ChristineTAuthor Commented:
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
 
Martin LissRetired ProgrammerCommented:
Christine it looks like reopening the question caused your points award to me to be lost. Could you do it again please?
0
 
ChristineTAuthor Commented:
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
 
Martin LissRetired ProgrammerCommented:
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now