나는이 데이터베이스를 가지고 있으며 완벽하게 작동하지만 오늘은 나를 미워하기 시작했습니다. 컴파일 오류가 발생하기 시작했습니다 : 프로젝트 또는 라이브러리를 찾을 수 없습니다. 주변을 둘러 보았을 때 VBA 및 참조에서 다른 컴퓨터의 프런트 엔드를 사용할 때 Microsoft Word 15.0 개체 라이브러리에 대한 참조가 누락되었다는 것을 알았습니다.MS 액세스 VBA 참조
내 컴퓨터 Microsoft Word 16.0 개체 라이브러리를 확인했습니다. 15.0 및 16.0을 사용하는 다른 컴퓨터에서 어떻게 작동합니까?
다음은 개발 과정에서 말씀에 대한 참조를 추가 코드
Private Sub cmd_LocateFile_Click()
On Error GoTo Error_Handler
Dim sFile As String
Dim sFolder As String
Dim ID As Long
Dim sTarget As String
sFile = FSBrowse("", msoFileDialogFilePicker, "All Files (*.*),*.*")
If sFile <> "" Then
sFolder = ("\\aiowima23fp1\Ecological Sciences and Engineering\Cultural Resources\New - Cultural Resources Request Database") & "\" & sAttachmentFolderName & "\"
If FolderExist(sFolder) = False Then MkDir (sFolder)
ID = RequestID_FK ' Set current record id.
sTarget = sFolder & CStr(ID) & "-" & GetFileName(sFile)
If CopyFile(sFile, sFolder & GetFileName(sTarget)) = True Then
Me!FullFileName.Value = sTarget
Else
End If
End If
Error_Handler_Exit:
On Error Resume Next
Exit Sub
Error_Handler:
MsgBox "The following error has occured" & vbCrLf & vbCrLf & _
"Error Number: " & Err.Number & vbCrLf & _
"Error Source: " & sModName & "\cmd_LocateFile_Click" & vbCrLf & _
"Error Description: " & Err.Description & _
Switch(Erl = 0, "", Erl <> 0, vbCrLf & "Line No: " & Erl) _
, vbOKOnly + vbCritical, "An Error has Occured!"
Resume Error_Handler_Exit
End Sub
후기 바인딩을 사용하십시오. 그보다 더 구체적인 것을 원하면 코드를 공유해야합니다. –
코드를 포함하도록 질문을 편집했습니다. –
임의 코드뿐 아니라 Microsoft Word Object Library 참조에 의존하는 코드를 포함하십시오. –