xuanchientn
Thành viên mới

- Tham gia
- 28/9/16
- Bài viết
- 12
- Được thích
- 0
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.

Tôi mở lên thấy lỗi code không thấy File Excel đâu, cũng không biết đường mò giùm bạn nữa hichiccác bác cho em hỏi sao form lọc dữ liệu của em sau khi lọc lại mất cột số thứ tự nhỉ.mong các bác chỉnh sửa hộ em với.Cảm ơn all

Tại sao có cụm đỏ? Ở trên các việc này đã làm rồi tại sao lặp lại một lần nữa?Sub LOC(DateDebut As Date, DateFin As Date, Prescripteur As String)
Dim F As Worksheet
Dim LR As Long
Dim L As Range
Dim i As Integer, LIGNE As Integer
Set F = ThisWorkbook.Sheets("GIAO DICH")
LR = F.Range("A" & Rows.Count).End(xlUp).Row
With Me.XUANCHIEN
If Me.LNGAY <> "" And Me.LNGAY1 <> "" And Me.MALK = "" Then
.ListItems.Clear
.View = lvwReport
.FullRowSelect = True
If LR = 2 Then Exit Sub
LIGNE = 1
For Each L In F.Range("B4:B" & LR)
If CDate(L) >= DateDebut And CDate(L) <= DateFin Then
.ListItems.Add , , L
For i = 1 To 7
.ListItems(LIGNE).ListSubItems.Add , , UNItoTCVN3(L.Offset(, i - 1))
Next i
LIGNE = LIGNE + 1
End If
Next L
End If
Set F = Nothing
Set F = ThisWorkbook.Sheets("GIAO DICH")
LR = F.Range("A" & Rows.Count).End(xlUp).Row
If Me.LNGAY <> "" And Me.LNGAY1 <> "" And Me.MALK <> "" Then
.ListItems.Clear
.View = lvwReport
.FullRowSelect = True
If LR = 2 Then Exit Sub
LIGNE = 1
For Each L In F.Range("B4:B" & LR)
If CDate(L) >= DateDebut And CDate(L) <= DateFin And CStr(L.Offset(, 2)) = Prescripteur Then
.ListItems.Add , , L.Offset(, -1).Value '.ListItems.Add , , L
For i = 1 To 7
.ListItems(LIGNE).ListSubItems.Add , , UNItoTCVN3(L.Offset(, i - 1))
Next i
LIGNE = LIGNE + 1
End If
Next L
End If
End With
Set F = Nothing
Dim Item As ListItem
For Each Item In XUANCHIEN.ListItems()
Item.SubItems(1) = Format(Item.ListSubItems(1), "[$-409]d-mmm-yyyy;@")
Next Item
End Sub
.ListItems.Add , , L
.ListItems.Add , , L.Offset(, -1).Value
