bonsoir le forum
voila mon soucis ,j'ai mis un userform pour m'imprimer date a date
mais voila la premières il fonctionne au ralentis et deux il m'affiche quatre jours avant le début des date que je demander
sinon il fonctionne mais pourquoi il m'affiche quatre jours avant
ou est mon erreur
avec tout mes remercîments pour votre aide
Private Sub CommandButton1_Click()
Dim derlig&, i&, plage As Range, deb As Date, fin As Date
With Sheets("basededonnéesglobal")
derlig = .Range("a" & Rows.Count).End(xlUp).Row
deb = CDate(TextBox1.Value)
fin = CDate(TextBox2.Value)
For i = 6 To derlig
If CDate(.Cells(i, 1)) >= deb And CDate(.Cells(i, 1)) <= fin Then
.Cells(i, 1).EntireRow.Hidden = False
Else
.Cells(i, 1).EntireRow.Hidden = True
End If
Next i
Set plage = .Range("a1:n" & .Range("a" & Rows.Count).End(xlUp).Row)
Unload Me
.PageSetup.PrintArea = plage.Address
.PrintPreview
.Rows("2:106").Hidden = False
End With
End Sub