koffer08 Posted November 12, 2010 Share Posted November 12, 2010 Hey guys, I'm trying to get this code to work for me here, basicly i want it to grab a specif file and move it in a different directory, so basicly from G:\ to C:\ and i dont want to delete it at the end, this one seems to give you the option to choose the file and location then delete it. i want it from one specific file to one specific folder no options and not to delete it. thank you. Sub test()Dim strSelFile As StringDim strNewLoc As StringMsgBox ("Select file to copy")With Application.FileDialog(msoFileDialogFilePicker)If .Show = False Then EndstrSelFile = .SelectedItems(1).AllowMultiSelect = False.Title = "Location to output new file to"End WithMsgBox ("Select location to output file to")With Application.FileDialog(msoFileDialogFolderPicker)If .Show = False Then EndstrNewLoc = .SelectedItems(1).AllowMultiSelect = False.Title = "Location to output new file to"End WithFileCopy strSelFile, strNewLocIf MsgBox("Do you want to delete the source file?", vbYesNo) = vbNo Then Kill (strSelFile)MsgBox ("Done!")End Sub Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.