Created
February 19, 2019 04:55
-
-
Save DuongAQ/57c26b183ffbcce053109f68e7c2f834 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub BCTH_Export() 'Bai tap xuat du lieu tu file nay sang file khac | |
'Thiet lap cac bien | |
Dim MyWB As Workbook, NewWB As Workbook | |
Set MyWB = ThisWorkbook | |
Set NewWB = Workbooks.Add | |
'Lay du lieu | |
MyWB.Worksheets("Sheet1").Range("B1:C17").Copy | |
NewWB.Worksheets("Sheet1").Range("A1:B17").PasteSpecial Paste:=xlPasteColumnWidths | |
NewWB.Worksheets("Sheet1").Range("A1:B17").PasteSpecial Paste:=xlPasteValues | |
NewWB.Worksheets("Sheet1").Range("A1:B17").PasteSpecial Paste:=xlPasteFormats | |
NewWB.Activate | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment