Hi Guys
Sorry to bother you all, I have a little problem with some code I am working on.
I have an .xlsm file which I ExportAsFixedFormat to pdf, using the following code (this is only test version):
However when I need to re-export the version it just overwrites the existing, but I would like to keep the original, therefore is there a way to check if the file exists first and if so to simply increase the number to the next number on, (therefore if I am up to Test3, then it would go to Test 4). I guess some kind of loop until.
Thanks for your input. I am trying to expand my use and knowledge of VBA, so please excuse my in-experience.
Sorry to bother you all, I have a little problem with some code I am working on.
I have an .xlsm file which I ExportAsFixedFormat to pdf, using the following code (this is only test version):
Code:
Worksheets("Sheet2").Select
ActiveSheet.ExportAsFixedFormat Type:=xltypepdf, Filename:="C:\Test1.pdf"
However when I need to re-export the version it just overwrites the existing, but I would like to keep the original, therefore is there a way to check if the file exists first and if so to simply increase the number to the next number on, (therefore if I am up to Test3, then it would go to Test 4). I guess some kind of loop until.
Thanks for your input. I am trying to expand my use and knowledge of VBA, so please excuse my in-experience.