|Try something like this. If it works, I'll tell you where I got it. If not, I'll work on something else.|
As written, it will use the current file path and file name. If a .xlxs with that name already exists, it will overwrite it. Of course, that could be dealt with in multiple ways.
BTW...When asking for help with a macro that isn't working, it helps if you post the code so we can see it. Sometimes all it takes is slight tweak, which we can't do if we don't know what we are working with.
Dim x As String, y As String
Application.DisplayAlerts = False
x = ActiveWorkbook.Path
y = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 5)
ActiveWorkbook.SaveAs x & "/" & y & ".xlsx", FileFormat:=xlOpenXMLWorkbook
Application.DisplayAlerts = True
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.