After running the macro, I want to save a new copied workbook with a filename using several cells in the worksheet + date. This file will be used by multiple people so the path will be different by user. I was hoping to rename the workbook and when saved, it would be in the same folder as the original workbook. I tried:
ThisWorkbook.Sheets(Array("Sheet1", "Sheet2")).Copy
ThisWorkbook.SaveCopyAs Sheets("Sheet2").Range("A21") & " " & Sheets("Sheet2").Range("A18") & " " & Format(Now(), "DD-MMM-YYYY") & ".xlsx"
However, it is not saving it in the same folder. It saves in a random folder with the correct name. Also, the copied version of the workbook is open but does not reflect the new name. Is there a way to have the new file save in the same folder as the original file and to have the new opened document reflect the new name?
ThisWorkbook.Sheets(Array("Sheet1", "Sheet2")).Copy
ThisWorkbook.SaveCopyAs Sheets("Sheet2").Range("A21") & " " & Sheets("Sheet2").Range("A18") & " " & Format(Now(), "DD-MMM-YYYY") & ".xlsx"
However, it is not saving it in the same folder. It saves in a random folder with the correct name. Also, the copied version of the workbook is open but does not reflect the new name. Is there a way to have the new file save in the same folder as the original file and to have the new opened document reflect the new name?