Necesito que este reporte lo genere buscando en mas de una hoja y en campos distintos
Publicado por Vic (1 intervención) el 01/10/2014 00:21:57
Necesito que este reporte lo genere buscando en mas de una hoja y en campos distintos
GRACIAS...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
If fecha1 = "" And Fecha7 = "" Then
MsgBox "Selecciona una fecha o un nombre"
Exit Sub
End If
If fecha2 = "" Then fecha2 = fecha1
Set h1 = Sheets("Hoja1")
h1.AutoFilterMode = False
h1.Range("$A$1:$L$19").AutoFilter Field:=5, _
Criteria1:=">=" & Format(fecha1, "mm/dd/yyyy"), Operator:=xlAnd, _
Criteria2:="<=" & Format(fecha2, "mm/dd/yyyy")
h1.PrintOut Copies:=1, Collate:=True
h1.AutoFilterMode = False
End Sub
GRACIAS...
Valora esta pregunta


0