Hi,
I have the following code for saving a new sheet, but this only works when the original file is .xlsm. Any way to change this to work when the original file is .xltm?
When the original file is .xlsm it saves in the right shared Onedrive folder, but when the original file is .xltm the now file saves locally on the computer.
Please help
I have the following code for saving a new sheet, but this only works when the original file is .xlsm. Any way to change this to work when the original file is .xltm?
When the original file is .xlsm it saves in the right shared Onedrive folder, but when the original file is .xltm the now file saves locally on the computer.
Code:
Sub SvMe()
Dim newFile As String, fName As String
fName = Range("B34").Value
newFile = fName & " " & Format$(Date, "dd-mm-yyyy")
With ActiveWorkbook
.SaveAs Filename:=ThisWorkbook.Path & "\" & newFile & ".xlsm", FileFormat:=52
End With
End Sub
Please help