Este es el código:
Private Sub btn_Procesar_Click()
Dim Fila As Integer
Dim Final As Integer
'Buscamoos la última fila
Fila = 2
Do While Hoja28.Cells(Fila, 1) <> ""
Fila = Fila + 1
Loop
Final = Fila
'Agregamos el bloque de items
For i = 0 To Me.ListBox1.ListCount - 1
Hoja28.Cells(Final, 1) = Me.ListBox1.List(i, 0) 'Cuenta
Hoja28.Cells(Final, 2) = Me.ListBox1.List(i, 1) 'Fecha
Hoja28.Cells(Final, 3) = Me.ListBox1.List(i, 2) 'Sin Credito Fiscal
Hoja28.Cells(Final, 4) = Me.ListBox1.List(i, 3) 'Monto Total
Final = Final + 1
Next
ListBox1.Clear 'Limpiamos el listbox
i = 0 'Reiniciamos el índice de registros del listbox
ComboBox1.SetFocus 'Enviamos el foco al control
'Ordenamos por fecha
Range("A1:F1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Worksheets("GSTSNFACT").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("GSTSNFACT").Sort.SortFields.Add Key:=Range( _
"B2:B501"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("GSTSNFACT").Sort
.SetRange Range("A1:F501")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Gracias