Hmmmmmmmmmmmmm, I place in the your code and ran it now I get the following error message
"Error#:424 Object Required, Copy Failed"
below is the revised code
Private Sub cmdMoveFiles_Click()
On Error GoTo ErrorX
Dim x As SHFILEOPSTRUCT
Dim StrFile As String
StrFile = Me.DS_X1.Value
'Copies the file in textbox DS_X1
'String function to get rid of the "#" from the hyperlink.
x.pFrom = Mid(StrFile, 2, Len(StrFile) - 2)
'Pastes the file to stated location.
x.pTo = "K:\"
x.fFlags = FOF_NOCONFIRMATION
x.wFunc = FO_COPY
SHFileOperation x
fs.CopyFile strSourcePath, strDestinationPath
strSourcePath = "C:\" & Me.DS_X1.Value
strDestinationPath = "K:\" & Me.DS_X1.Value
Set fs = CreateObject("scripting.FileSystemObject", True)
MsgBox "Copy Complete.", vbOKOnly
Exit Sub
ErrorX:
MsgBox "Error #:" & Err.Number & " " & Err.Description & vbCrLf _
& "Copy Failed."
End Sub
"Error#:424 Object Required, Copy Failed"
below is the revised code
Private Sub cmdMoveFiles_Click()
On Error GoTo ErrorX
Dim x As SHFILEOPSTRUCT
Dim StrFile As String
StrFile = Me.DS_X1.Value
'Copies the file in textbox DS_X1
'String function to get rid of the "#" from the hyperlink.
x.pFrom = Mid(StrFile, 2, Len(StrFile) - 2)
'Pastes the file to stated location.
x.pTo = "K:\"
x.fFlags = FOF_NOCONFIRMATION
x.wFunc = FO_COPY
SHFileOperation x
fs.CopyFile strSourcePath, strDestinationPath
strSourcePath = "C:\" & Me.DS_X1.Value
strDestinationPath = "K:\" & Me.DS_X1.Value
Set fs = CreateObject("scripting.FileSystemObject", True)
MsgBox "Copy Complete.", vbOKOnly
Exit Sub
ErrorX:
MsgBox "Error #:" & Err.Number & " " & Err.Description & vbCrLf _
& "Copy Failed."
End Sub