This macro works as loop which is designed to copy a list of documents and paste them to designated file locations.
The macro works fine except often times when I am copying and pasting a long list of file addresses there may be an incorrect file address or document name mixed into the list.
If this is the case the macro gets an error until I am able to identify which address is incorrect and fix it.
The details are:
The file addresses where the document to be copied is currently located is in Column F and
The file addresses where the document is going to be pasted is located in Column G.
Column D contains the document name.
The macro will copy and paste the documents located in Columns F and G for every row in Column D which contains data.
The starting row is Row 3.
What I need help with is creating a line a code which will identify which lines contains an error so I can quickly identify which address needs to be fixed.
Or in other words I would like the macro to identify which row in the spreadsheet is stopping the program from completing.
The solution that I believe will work best for me is if this code could scan through identify any errors first and if there are any errors then the code will
highlight them on the spreadsheet and stop the macro with a message box. However, if anyone else has a better idea I am open to suggestions.
If no errors are found then it just runs the code like normal.
Can anyone help with that?
Please Login or Register to view this content.
Document Moving Macro.xlsm
Bookmarks