Function CreateLibRef(strlibName As String)
Dim ref As Reference
On Error GoTo CreateLibRef_Err
'Create new reference
Set ref = References.AddFromFile(strlibName)
CreateLibRef = True
Exit_CreateLibRef:
Exit Function
CreateLibRef_Err:
Dim intAnswer As Integer
Dim strLocation As String
intAnswer = MsgBox("Library Not Found,Attempt to Locate?", vbYesNo, "Error")
If intAnswer = vbYes Then
strLocation = InputBox("Please Enter the Location of the Library")
Resume
Else
CreateLibRef = False
GoTo Exit_CreateLibRef
End If
End Function
Access软件网交流QQ群(群号:198465573) |