Good Evening All,

I have a big problem; over the summer I worked on a project and completed it. A month later I am receiving errors.

For some reason when I try compiling the program, it gives me an error saying "Can't find project or library," Date is highlighted. When the user clicks on a control button, the program is suppose to output the current date. For some reason it does not.

Can someone tell me what object library to download? Also, my program no longer recornizes "objWord", even though I have checked "Microsoft Word library" as reference.

Please help, thank you very much;

Sounds to me like something that is supposed to be installed is not. Also, you might be having a version reference conflict. Maybe the installed version of word doesn't use a specific method that's being invoked.

Is there an object library for "Date" or "Word" that I need to install?

Ini

[

I would ensure that you have the vbruntime files updated. Date is an internal VB command, so there should be no issues with it.

While both of those links are useful, the problem here doesn't seem to be Access related. I wonder, did you upgrade (or downgrade?) your copy of Visual Basic between the time you wrote the program and now? For example, a switch from VB5 to VB6 (or vice-versa)? If so, that may be part of the problem. While the modifications that need to be made to VB5 code to make it work with VB6 are minimal, they are essential as well. Downgrading (from VB6 to VB5 for example) is even worse, as commands tend to disappear that way.

However, if you haven't changed your VB install any since then, there may be a problem. I'd suggest installing Service Pack 6 at least (available on the Microsoft website for free download) to see if that helps. If not, more details will be required to make us of any use.

Good luck, and happy coding!

- Sendoshin

I had the same issue. I did upgrade my copy of Visual Basic but that was not the problem. If you go to Tools>References and unselect any checkboxes that have the word MISSING in them from the list of libraries it should work. In my case it turns out I uninstalled some software and the reference was left there...
This should make the error go away (that is of course if the MISSING library is not one that you are requiring...)

chepo, this is it. I have searched for the cause of the stupid problem for a while. I had installed my environment and projects in a virtual machine and could only curse like crazy as I was not able to compile anything that had worked before. I had not nticed this "MISSING" flag.
Of course no clue about that at the microsoft sites!
Thanks a bunch.

hey the same problem occured with my app also. Had reinstalled the VB.and was getting thr compile error for Listview decl. After unchecking the Refrence starting as MISSING. the issue was resolved. Thanks

I had the same problem too. An uninstall was needed to update another app. This caused the "Can't find project or library" problem. The issue was resolved after unchecking the MISSING Reference. Old thread, but still very usefull. Thank you!

Sounds to me like something that is supposed to be installed is not. Also, you might be having a version reference conflict. Maybe the installed version of word doesn't use a specific method that's being invoked.

Hey,
I am getting the same error on a program i wrote & last ran about 3 months ago. Now it wont run & i havent changed anything on my computer esp VB.I am geting
Compile Error:
Can't find project or Library

then my this part of my code is highligted "Public LcsTt As Database" any idea why this is happening?

Regards

Hey,
I am getting the same error on a program i wrote & last ran about 3 months ago. Now it wont run & i havent changed anything on my computer esp VB.I am geting
Compile Error:
Can't find project or Library

then my this part of my code is highligted "Public LcsTt As Database" any idea why this is happening?

Regards

This error is always caused by VB not finding the right external files to do what you're asking it to do - whether because a file was moved or deleted, or because a recent update changed the way the reference is used. Microsoft Update is a frequent culprit in this case. Keeping your computer up-to-date has a habit of breaking things. Check the References for the project to see if you're missing any - in this case, probably ADO, ODBC, or Access. Basically, VB can't find any reference to decide what type of variable "Database" is, so it can't create LcsTt as one.

It's also possible that your license to whatever library you're using has expired, especially if you're trying to use Access and you only had a trial version of Office installed. Make sure that isn't the case, either. If you still can't figure it out, we'll need more information to help you out further, though short of uploading your entire project I don't know how you'd get it all to us efficiently. Hopefully it won't come to that.

- Sendoshin

It's also possible that your license to whatever library you're using has expired, especially if you're trying to use Access and you only had a trial version of Office inst called.

Oh contraire Sendoshin...

The data access methods for communicating with access databases is seperate from MS office products. In fact, they are shipped with the OS and constantly have updates that are called MDAC (Microsoft Data Access Components) with some sort of version number tied into the file name for example http://support.microsoft.com/kb/219293 (however mdac 2.8 is not listed in this list and for some reason I cannot find the current list at the moment as M$ is running too slow for my tastes).


Now, as for the error poster/post #11 is recieving. Check your references. Do you have both ADO and DAO? If so, move the DAO reference up via the up arrow button so it is prior to the ADO reference. Or, does it say that the DAO reference is missing? Then you may need to download and install a MDAC version prior to 2.6, because DAO is no longer shipped as part of MDAC starting at 2.6. But before you do that, deselect the missing reference, hit ok, save entire project, go back to references, find correct reference, select, ok, run. Does it work now?

Now, if you are not missing a reference and do not have more than one data access method then you may have to declare it as Dim db as DAO.Database...

Good Luck

Oh contraire Sendoshin...

The data access methods for communicating with access databases is separate from MS office products.

I stand corrected. Silly me for assuming that Micro$oft's license-happiness with everything else would extend to their libraries as well. :)

- Sen

I am done a project for my college... That projects runs successfully in my lap while running in my college system it showing the error "cant find project or library"... Actually the projects opens the word,powerpoint and pdf files while clicking the command button... any one pls suggest me how to rectify these error

We would need to know a lot more about what your program is trying to do and what it's failing on to even begin to help. For starters, are you running the project from source on the college system? If you're running it as a compiled .exe, your college system probably doesn't have all of the DLL or OCX files your project is using, or at least it doesn't know where to find them. If you are running it from source, however, inside the VB IDE, the solutions outlined above will be of much more help. The IDE does everything it can to help you figure out what's causing issues (though it does have some trouble in some areas).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.