Vba Current Workbook Filename. Hi guys, I am looking for code to add to the end of my macro which will save the file as "SRS Sheet - " and then the current date. I want it to save in a.
Although numerals (index) is also accepted, you can't be sure what index refer to what workbook. Within Visual Basic for Applications, the method that opens an Excel workbook is the Workbooks. It refers to the current workbook i.e. the workbook that contains the VBA code.
I want it to save in a.
Note that the file name can be changed, but the file path of the current file and new file must be the same; otherwise it is a copy file, not rename file.
If you want to close all the workbooks, except the workbook that has the current code in it, you can use. I am trying to specify the path by specifying the same path as the current workbook is that of the other open workbook to close too. It refers to the current workbook i.e. the workbook that contains the VBA code.