Hello,
I would need your assistance on the references. I partly found the answer to my question about this forum thanks to the post of Wayne Ryan.
I 'm not sure if it's the best way to resolve my solution but it's problaly one solution?
I will place my file access in a folder on a server. I will create under folder or I will store my DLL.
My questions.
Is it possible to copy a file of a folder towards another folder in VBA.
Is it possible to check in the place of the user, the objects which I will use in the window of the References (window VBA Tool, Menu references) like the object DAO.
Thank you for your assistance.
Here the code of WayneRyan:
Sub SetRefs()
Dim ref As Reference
Dim intref As Integer
Dim ErrorMsg As String
On Error GoTo Err_SetRefs
intref = 1
Set ref = References.AddFromFile("C:\Program Files\Taugas\Inspection Butler\Lib\MSADOR15.DLL")
intref = 2
Set ref = References.AddFromFile("C:\Program Files\Taugas\Inspection Butler\Lib\MSADO25.TLB")
Exit Sub
Err_SetRefs:
Debug.Print DBEngine.Errors(0).Number
Select Case intref
Case 1
ErrorMsg = "No MSADOR15.DLL"
Case 2
ErrorMsg = "No MSADO25.TLB"
End Select
MsgBox (ErrorMsg)
End Sub
Nilses
I would need your assistance on the references. I partly found the answer to my question about this forum thanks to the post of Wayne Ryan.
I 'm not sure if it's the best way to resolve my solution but it's problaly one solution?
I will place my file access in a folder on a server. I will create under folder or I will store my DLL.
My questions.
Is it possible to copy a file of a folder towards another folder in VBA.
Is it possible to check in the place of the user, the objects which I will use in the window of the References (window VBA Tool, Menu references) like the object DAO.
Thank you for your assistance.
Here the code of WayneRyan:
Sub SetRefs()
Dim ref As Reference
Dim intref As Integer
Dim ErrorMsg As String
On Error GoTo Err_SetRefs
intref = 1
Set ref = References.AddFromFile("C:\Program Files\Taugas\Inspection Butler\Lib\MSADOR15.DLL")
intref = 2
Set ref = References.AddFromFile("C:\Program Files\Taugas\Inspection Butler\Lib\MSADO25.TLB")
Exit Sub
Err_SetRefs:
Debug.Print DBEngine.Errors(0).Number
Select Case intref
Case 1
ErrorMsg = "No MSADOR15.DLL"
Case 2
ErrorMsg = "No MSADO25.TLB"
End Select
MsgBox (ErrorMsg)
End Sub
Nilses