babyheomoi
Thành viên thường trực




- Tham gia
- 22/9/13
- Bài viết
- 396
- Được thích
- 91
Em có 1 file data khá nặng, sử dụng chức năng ẩn sheets!
Chi tiết code như sau:
Dữ liệu nằm hết ở sheets "data", file em nhận được chỉ là sheets "Chi Nhánh", tuy nhiên em đọc code nhưng trình độ hạn chế nên không biết làm sao hiện sheets "data"
Nhờ mấy ACE giúp đỡ sửa code hay làm code mới để hiện sheets"data" ạ!
Em cám ơn!
Chi tiết code như sau:
Mã:
Sub Tlinhf()
'
' Tlinhf Macro
'
'Application.ScreenUpdating = False
ActiveWorkbook.Unprotect
Sheets("Chinhnhanh").Select
Range("A4:M5000").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Sheets("Chinhnhanh").Select
Sheets("Data").Visible = False
Sheets("Data").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$M$5416").AutoFilter Field:=1, Criteria1:=Sheets("Chinhnhanh").Range("a2")
Range("A1:M1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("Chinhnhanh").Select
Range("A5").Select
ActiveSheet.Paste
Cells.Select
Cells.EntireColumn.AutoFit
Sheets("Data").Select
ActiveWindow.SelectedSheets.Visible = True
Range("A5").Select
Application.CutCopyMode = False
ActiveWorkbook.Protect Structure:=True, Windows:=True
Application.ScreenUpdating = True
End Sub
Nhờ mấy ACE giúp đỡ sửa code hay làm code mới để hiện sheets"data" ạ!
Em cám ơn!