Sub LuuFileMoi()
Dim EndR As Long, FName As String
EndR = Sheets("QUOTESHEET").Range("K6").Value
FName = InputBox("New File Name:")
ActiveWorkbook.Sheets.Copy
ActiveWorkbook.SaveAs Filename:=FName
Sheets("QUOTESHEET").Range("K6").Value = EndR
End Sub
Anh chị ơi mình nên gọi hàm này ở đâu để sau khi nó lưu ra một file mới thì tự động đóng file đang mở lại luôn ạ??? Tại vì sau khi lưu file thành một file mới bằng lệnh saveas thì nó tiếp tục lưu file mới nữa.
Dim EndR As Long, FName As String
EndR = Sheets("QUOTESHEET").Range("K6").Value
FName = InputBox("New File Name:")
ActiveWorkbook.Sheets.Copy
ActiveWorkbook.SaveAs Filename:=FName
Sheets("QUOTESHEET").Range("K6").Value = EndR
End Sub
Anh chị ơi mình nên gọi hàm này ở đâu để sau khi nó lưu ra một file mới thì tự động đóng file đang mở lại luôn ạ??? Tại vì sau khi lưu file thành một file mới bằng lệnh saveas thì nó tiếp tục lưu file mới nữa.