Can't Find Project or Library when using WinXP...

Can't Find Project or Library when using WinXP...

Anonymous
Not applicable
337 Views
3 Replies
Message 1 of 4

Can't Find Project or Library when using WinXP...

Anonymous
Not applicable
I have written a program that calculates our bill of materials. For some
reason the one user that has Windows XP Pro for his OS gets a error when he
tries to run the program. First I get "Compile Error: Can't find project or
library". When I debug the project I get the error at statements like MID("
") and Left(" ") which are just standard VBA statements.

I figured this was a easy fix. I went to the references and tried to remove
the missing reference. There is a missing reference of "MSInfo MSICDROM
Category Module". So I try to remove it and I get another message that says
"Can't remove control or reference; in use". I unloaded all projects except
that one to make sure another project wasn't using it. That didn't help. I
know the project I am using doesn't use that reference. Anyone have any
suggestions? Thanks for the help in advanced.

Bryan
0 Likes
338 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Never mind. I was able to fix the issue by going to a Win98 machine with
AutoCAD and removing the reference. Don't ask me why WinXP prevents you from
removing references it thinks are in use even though they aren't.

Bryan

"Bryan" wrote in message
news:019F9D121773218C1979F5C586FF8689@in.WebX.maYIadrTaRb...
> I have written a program that calculates our bill of materials. For some
> reason the one user that has Windows XP Pro for his OS gets a error when
he
> tries to run the program. First I get "Compile Error: Can't find project
or
> library". When I debug the project I get the error at statements like
MID("
> ") and Left(" ") which are just standard VBA statements.
>
> I figured this was a easy fix. I went to the references and tried to
remove
> the missing reference. There is a missing reference of "MSInfo MSICDROM
> Category Module". So I try to remove it and I get another message that
says
> "Can't remove control or reference; in use". I unloaded all projects
except
> that one to make sure another project wasn't using it. That didn't help. I
> know the project I am using doesn't use that reference. Anyone have any
> suggestions? Thanks for the help in advanced.
>
> Bryan
>
>
0 Likes
Message 3 of 4

Anonymous
Not applicable
Hi,

I too get the same error message when I run the program.
My machine is XP, Acadmap2002.

Could someone tell me how to find which module is missing in VBAIDE? How to get a list of modules being referenced by the VBA during execution / compile?

Thanks,
MNRaghu
0 Likes
Message 4 of 4

Anonymous
Not applicable
Hi,
I got some answers as follows.

----------From: http://www.cadvault.com/forums/showthread.php?p=78766#post78766&conly=

You might find this little snip from our "common error list" interesting,

can't find project or library
Compile error
When editor highlights intrinsic VBA method

The function is part of the VBA library, is VBA saying it
can't find itself?
What's happening here?
VBA isn't missing the reference to itself, but there is a missing
reference, and when VBA navigated the projects references to get
the function, it hit the missing reference and returned an
error. Code breaks at that line, highlights the function that it
was looking for when the error occurred and gives you the compile
error.

---o How to Fix it?

Method One:
Open the References Dialog (Tools -> References) and uncheck the
reference that is marked as missing. If the reference is one that
you need, you will need to locate the dll (or OCX) and return it
to the correct folder, or reregister it in it's new location
(a process that will vary depending on what the Library is, see
the documentation that accompanied it).

Method 2
If you have no references listed as broken, Verify that the VBA
Object Library has the highest priority by selecting it in the
reference dialog and pressing the "UP" priority button until the
VBA Library is the topmost member of the list.

Method 3
If that still hasn't fixed it, you can specify the library that
the functions are derived from, by providing the library name
prior to the procedure..



Val = Function(arguments)



val = VBA.Function(arguments)


---another answer by an unknown gentleman----
This is not actually an answer to question, more of an alternate approach
suggestion. Get yourself a copy of InstallShield Express. Make a project
containing all of the libraries your .DVB's use, but do not include the
actual .DVB's themselves. Compile it into a Setup.Exe file set. Then run
the Setup.Exe on each of your client machines. This will install and
register the libraries locally on each client. When your library inclusions
change, all you need to do is rebuild and redistribute the Setup.Exe file
set.

----alternative-------from Laurie Comerford
You may care to try InnoSetup rather than InstallShield. Not only is there
a significant cost differential in getting the product (InnoSetup if free),
but I found InnoSetup far easier to use.

This is the script I use for the VB runtime files which are kept in a
subdirectory of a directory 2 above the location of the script file. Hence
the "..\..\"

Obviously watch for word wrap. Also if you are typing all the items which
resemble parenthesis are actually the squiggly bracket.

Files]
;VB Runtime files
Source: "..\..\VBRuntime\asycfilt.dll"; DestDir: "{sys}"; CopyMode:
alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall
sharedfile;

Source: "..\..\VBRuntime\comcat.dll"; DestDir: "{sys}"; CopyMode:
alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall
sharedfile regserver;

.
.
.

-------------------------------------------------
If anyone has some more, please do let me know. My problem is solved for now.

Thanks,

MNRaghu
0 Likes