check file path/name prior to running a macro

  • I am using this spreadsheet that picks up a filename- full path (variable) with whatever is in column A of my spreadsheet, and then runs the macros in the subsequent columns and re-saves the file. Before running this, I wanted to include a macro that would check all of the filenames in column A to make sure they are valid file paths/filenames.. if not, highlight the cells that are bad paths. Does anyone know of a way to do, if even possible?


    Thanks all for any suggestions!!

  • Re: check file path/name prior to running a macro


    I took a look at the DIR command, and attempted something, but could use some assistance- I'm sure this is fairly elementary, but new to me - any assistance you could provide would be helpful!!!


    I have a listing of file paths in column A (starting in cell A3). I'd like the macro to check filepath in cell A3 and if it is a valid path then go to the next A4. If not a valid path highlight. This is what I have so far:


  • Re: check file path/name prior to running a macro


    That was a good start .... have a look @ this.


    For further help highlight the Key words and press F1


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!