Documentos de Académico
Documentos de Profesional
Documentos de Cultura
'Entradas
For Fila = 1 To 1000
If Hoja3.Cells(Fila, 1) = "" Then
final = Fila - 1
Exit For
End If
Next
'Salidas
For Fila2 = 1 To 1000
If Hoja4.Cells(Fila2, 1) = "" Then
Final2 = Fila2 - 1
Exit For
End If
Next
CodProd = Me.ComboBox1
ContarFilas = 9
' Asignar el CodProd (cdigo de producto) para el reporte
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(1, 1) =
"DETALLE DE MOVIMIENTOS DE " & UCase(Me.txt_Nombre)
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(3, 2) = CodProd
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(4, 2) =
Hoja2.Cells(Fila, 2)
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(5, 2) =
Hoja2.Cells(Fila, 3)
Exit For
End If
Next
'Entradas
For Registro = 1 To final
If Hoja3.Cells(Registro, 2) = CodProd Then
ContarFilas = ContarFilas + 1
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(ContarFilas, 2) =
Hoja3.Cells(Registro, 1) 'Comprb
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(ContarFilas, 3) =
Hoja3.Cells(Registro, 4) 'Fecha de ingreso
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(ContarFilas, 4) =
Hoja3.Cells(Registro, 5) 'No.Factura
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(ContarFilas, 5) =
Hoja3.Cells(Registro, 6) 'Proveedor
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(ContarFilas, 6) =
Hoja3.Cells(Registro, 8) 'Tipo Entrada
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(ContarFilas, 7) =
Hoja3.Cells(Registro, 7) 'Cant. Entrada
End If
Next
'Salidas
ContarFilasFilas2 = 9
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(ContarFilasFilas2,
10) = Hoja4.Cells(Registro2, 5) 'No. de Transf
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(ContarFilasFilas2,
11) = Hoja4.Cells(Registro2, 6) 'Destino
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(ContarFilasFilas2,
12) = Hoja4.Cells(Registro2, 8) 'Tipo Salida
Application.Workbooks(NombreArchivo).Worksheets(1).Cells(ContarFilasFilas2,
13) = -Hoja4.Cells(Registro2, 7) 'Cant. Salida
End If
Next
.TintAndShade = -0.249946592608417
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = -0.249946592608417
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = -0.249946592608417
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = -0.249946592608417
.Weight = xlThin
End With
Range("A3").Select
ActiveWindow.DisplayGridlines = False