Belleke
Well-Known Member
I have this code
I get an error at this line
ActiveWorkbook.SaveAs Filename:=Path & Filename & ".xlsm", FileFormat:=52
What am I missing?
Thanks
Code:
Sub Belle()
Range("A2:R50").Copy
Workbooks.Add
With ActiveSheet
.PasteSpecial
.PasteSpecial xlPasteColumnWidths
End With
Path = "C:\test\"
Filename = ActiveSheet.Range("P7")
ActiveWorkbook.SaveAs Filename:=Path & Filename & ".xlsm", FileFormat:=52
ActiveWindow.Close
End Sub
ActiveWorkbook.SaveAs Filename:=Path & Filename & ".xlsm", FileFormat:=52
What am I missing?
Thanks