Chào các Pác cho Em hỏi Em có đoạn code này để lưu file mới với tên file là ô f1, nhưng chỉ lưu được đuôi ".xls" Em muốn lưu file mới với đuôi ".xlsm" thì làm thế nào? Em thêm chữ m sau đuôi nhưng khi lưu xong thì mở file mới ra thì lại không mở được vì báo lỗi. Trân trọng cảm ơn!
Private Sub CommandButton1_Click()
Dim path As String
Dim FileName As String
path = "D:\luu ke toan\"
FileName = Range("f1")
ActiveWorkbook.SaveAs FileName:=path & FileName & ".xls", FileFormat:=xlNormal
End Sub
Private Sub CommandButton1_Click()
Dim path As String
Dim FileName As String
path = "D:\luu ke toan\"
FileName = Range("f1")
ActiveWorkbook.SaveAs FileName:=path & FileName & ".xls", FileFormat:=xlNormal
End Sub