[help]. Code VBA chạy ngon trên Win nhưng không chạy được trên Mac

Núi 5011

Yêu THVBA
Em chào mọi người ạ, mọi người giúp em với
Em có con code VBA như này khi chạy trên máy Win thì ok, nhưng khi sang Mac thì lại ko chạy được ạ:
Sub ngay_len()
Dim vung_autofilter As Range
Dim o_ngay As Range
Dim o_thang As Range
Dim o_nam As Range
Dim vung_timeline As Range
Dim o_trung_gian As Range
Dim o_ngay_thang_dau_tien As Range
Dim hang_dau As Integer
Dim hang_cuoi As Integer
Set vung_autofilter = [b8:s8] 'thay doi'
Set o_ngay = [f1] 'thay doi'
Set o_thang = [i1] 'thay doi'
Set o_nam = [l1] 'thay doi'
Set vung_timeline = [u8:dk110] 'thay doi'
Set o_trung_gian = [l3] 'thay doi'
Set o_ngay_thang_dau_tien = [u7] 'thay doi'
hang_dau = 8 'thay doi
hang_cuoi = 110 'thay doi
Application.EnableEvents = False
Application.ScreenUpdating = False
vung_autofilter.AutoFilter
[a1].Select
If o_ngay < 31 Then o_ngay = o_ngay + 1
''''''''''''''''''
o_trung_gian = o_ngay_thang_dau_tien - 44561
o_trung_gian.NumberFormat = "General"
vung_timeline.Value = ""
vung_timeline.Value = Range(Cells(hang_dau, o_trung_gian + 200), Cells(hang_cuoi, o_trung_gian + 295)).Value
vung_autofilter.AutoFilter
Application.EnableEvents = True
Application.ScreenUpdating = True

End Sub
Khi chạy trên Mac thì nó cứ báo lỗi "Run-time error 1004: Method 'AutoFilter' of object 'Range' failed".
Mọi người giúp em với
 
Top