Hi there. I have the following, which saves the current tab as 12.txt.
Is there a way to specify the path? Is there a way to make it stop and not overwrite the file / prompt a message if 12.txt already exists in the location?
And finally, I notice that when it saves, it basically closes out the macro and then the active file is 12.txt. I want to save my results on the macro file first, so to combat this, do I need to first save the macro, then execute a modified version of the following file? Is there a way to close the txt file and automatically re-open my macro? Maybe I'm missing something though?
Is there a way to specify the path? Is there a way to make it stop and not overwrite the file / prompt a message if 12.txt already exists in the location?
And finally, I notice that when it saves, it basically closes out the macro and then the active file is 12.txt. I want to save my results on the macro file first, so to combat this, do I need to first save the macro, then execute a modified version of the following file? Is there a way to close the txt file and automatically re-open my macro? Maybe I'm missing something though?
Code:
ThisWorkbook.SaveAs "12", FileFormat:=xlTextWindows