Missing Object Libraries

P

Paul Morriss

Using a Visio drawing on another machine creates the:
Compile Error:
Can't find project or library.
The reason for this is that a couple of the references
are missing in VBA. This is because the location for
these references from the original machine was
C:\WINNT\System32 and the new machine has
C:\Windows\System32. Can someone tell me why all the
other references can cope with the different system
directory name, but two can't? How can this be solved
please, I'm at a loss.

The two object libraries are:

Adobe SVG Viewer Type Library 2.0
Miscrosoft Common Dialog Control 6.0(SP3)

Thank you
 
A

al

I'd start by checking the environment variables on the
failing machines against the one that works correctly. I'd
then check the file names of the libraries and the
subdirectories that they are in (to verify that they all
truly are in the same places) on both systems.
you might consider copying the libraries from the working
system to the failing system to ensure it's not a level
issue (of course renaming the existing ones so that you
can back them out if needed).
al
 
A

al

if as you say all of the other references are being found
on the failing system and the libraries are in the same
subdirectory, it would appear that it is not a path naming
problem (i.e. the winnt vs windows). the option then is to
identify why vba does not like the file until it is
specifically pointed at. are the library files the same
(i.e. date, size, version, etc.)? since the root is
different this says the operating systems may have
different dependencies, are the core products the same
(i.e. visio, office, vb libraries, etc.)
al
 
R

Reinier Post

Paul said:
Thank you for you're quick response.
I've checked everything and the only difference between
the two machines is the fact that one has a system
directory named WINNT and the other is Windows.
If I do a browse on the new machine for the two
libraries, it works fine, but this is not very user
friendly.

Try running this macro:

Public Sub ShowRefs()
ShowDocumentRefs ThisDocument
ShowDocumentRefs ActiveDocument
' AddThisDocumentRef ActiveDocument
End Sub

Public Sub ShowDocumentRefs(doc As Visio.Document)
Dim ref

For Each ref In doc.VBProject.references
MyDebug.MyPrint doc.name & " has a reference to " & ref.name & " at '" & ref.FullPath & "'"
Next

End Sub

You'll notice hardcoded pathnames.
You can change them, too, at least in Visio 2000.
 
R

Reinier Post

Paul said:
Thank you for you're quick response.
I've checked everything and the only difference between
the two machines is the fact that one has a system
directory named WINNT and the other is Windows.
If I do a browse on the new machine for the two
libraries, it works fine, but this is not very user
friendly.

Try running this macro:

Public Sub ShowRefs()
ShowDocumentRefs ThisDocument
ShowDocumentRefs ActiveDocument
End Sub

Public Sub ShowDocumentRefs(doc As Visio.Document)
Dim ref

For Each ref In doc.VBProject.references
MyDebug.MyPrint doc.name & " has a reference to " & ref.name & " at '" & ref.FullPath & "'"
Next

End Sub

You'll notice hardcoded pathnames.
You can change them, too, at least in Visio 2000.
 
R

Reinier Post

Paul said:
Thank you for you're quick response.
I've checked everything and the only difference between
the two machines is the fact that one has a system
directory named WINNT and the other is Windows.
If I do a browse on the new machine for the two
libraries, it works fine, but this is not very user
friendly.

Try running this macro:

Public Sub ShowRefs()
ShowDocumentRefs ThisDocument
ShowDocumentRefs ActiveDocument
End Sub

Public Sub ShowDocumentRefs(doc As Visio.Document)
Dim ref

For Each ref In doc.VBProject.references
Debug.Print doc.name & " has a reference to " & ref.name & " at '" & ref.FullPath & "'"
Next

End Sub

You'll notice hardcoded pathnames.
You can change them, too, at least in Visio 2000.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top