i want the code to collect from a folder and send it to cdlsave.Dir
1 Code:
Private Sub cmddownload_Click() Dim strSourceFileName As String Dim strDestination As String On Error GoTo ERR_Handler strSourceFileName = App.Path & "\server\" & Mid(strSourceFileName, InStrRev(strSourceFileName, "\") + 1) strDestination = cdlsave.FileName FileSystem.FileCopy strSourceFileName, strDestination Exit Sub ERR_Handler: MsgBox "An error has occured while copying file. Operation aborted.", vbExclamation, "File Copy Error" Err.Clear End Sub Private Sub cmdsave_Click() 'upload file link into database cdlsave.DialogTitle = "Upload File" cdlsave.Filter = "All Files(*.*)|*.*|Office Document 1997-2000(*.doc)|*.doc|Office Document 2003-2010(*.docx)|*.docx|" cdlsave.Flags = cdlOFNFileMustExist + cdlOFNPathMustExist cdlsave.ShowSave txtsave.Text = cdlsave.FileTitle End Sub




Reply With Quote