Find out where the dll files are stored, usually in
a shared directory, and copy that file there. Or you can add this type of code
to your code, copy the dll files to a shared network drive and be done with
it.
Public Function ChkRefs()
Dim strSource(0 To 10)
As String, strDest As String
Dim strSrceLoc As String, intRef As
Integer
Dim I As Integer
If
ThisDrawing.Application.VBE.ActiveVBProject.References.Count <> 11
Then
intRef =
ThisDrawing.Application.VBE.ActiveVBProject.References.Count
strSrceLoc = "I:\shared\"
strDest = "C:\Program
Files\Common Files\Microsoft Shared\YourOwn\"
strSource(0) = "VBE6.DLL"
strSource(1) =
"acad.tlb"
strSource(2) = "STDOLE2.TLB"
strSource(3) =
"FM20.DLL"
strSource(4) = "MSACC.OLB"
strSource(5) =
"msado21.tlb"
strSource(6) = "CAO15.dll"
strSource(7) =
"msadox.dll"
strSource(8) = "msjro.dll"
strSource(9) =
"MSCAL.OCX"
strSource(10) = "MSComctlLib.exd"
On Error Resume Next
'Make the directory to store the
dll 's in in this case strDest
MkDir strDest
On Error
GoTo 0
On Error Resume Next
For I = 0 To
10
FileCopy strSrceLoc &
strSource(I), strDest & strSource(I)
Next
For I = 0 To
10
ThisDrawing.Application.VBE.ActiveVBProject.References.AddFromFile strDest &
strSource(I)
Next
On Error GoTo
0
End If
Erase strSource
End Function
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
have a VBA project that works fine. 100 users use them every day. But only one
user becoms the message "Cannot Find
vba6.dll". On my mind this DLL cannot
be on his system (Its a VB library). What can I do?
PS: Sorry for my
English