Excel Macro question: "Create a Copy" of a tab

I am trying to make a macro that creates a copy of a tab into a new file. Very basic. However, if I change the file name of the spreadsheet that holds the macro, it gives an error because it is referencing the specific file name. Is there a way to reference it as “current file” or something of that nature, rather than by the actual filename?

a little confused b/c creating a copy of a tab into a new file should be straight forward and not require changing the filename. anyways to change file name, you could create the macro in your personal.xls or you can get fancy and use stringtext = ActiveWorkbook.Name then rename the “stringtext” variable as your file name.

Use Personal.xls