Me equivoque, pero este si exporta...
Private Sub ExportaPlacas()
Dim xlApli As Object
Dim xlLibro As Excel.Workbook
Dim FilaFlex As Integer
Dim FilaExcel As Integer
Set xlApli = New Excel.Application
Set xlLibro = xlApli.Workbooks.Add
''''''''''''''''''''''''''''''''''''''''''''''''''
With xlApli
.Sheets(1).Activate
FilaExcel = 10
.Range("A1:E1").Font.Size = 12
.Range("A1:E1").Font.Name = "Times New Roman"
.Range("A1:E7").Font.Bold = True
.Range("A1:E7").Font.Italic = True
.Range("A8:E8").Borders.LineStyle = 1
.Range("A8:E8").Interior.ColorIndex = 6
.Range("A8:E8").HorizontalAlignment = xlCenter
.Range("A1:E1").Select
End With
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
With xlApli.Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
With xlApli.Selection
.Merge
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlContinuous
.Borders.Weight = xlMedium
.Borders.ColorIndex = xlAutomatic
End With
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
With xlApli.Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
With xlApli.Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
With xlApli.Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
With xlApli
.Sheets(1).Activate
.Range("A1") = "LISTADO DE SERVICIOS POR PLACAS"
.Range("A3") = "CLIENTE :"
.Range("B3") = CBONOMBRE.Text
.Range("A5") = "FECHA :"
.Range("B5") = Date
.Range("A6") = "HORA :"
.Range("B6") = Time
.Range("A8") = "PLACAS"
.Range("A10") = MSFlexGrid1.TextMatrix(1, 2)
.Range("B8") = "FECHA SERVICIO"
.Range("C8") = "MARCA"
.Range("D8") = "KILOMETRAJE"
.Range("E8") = "DETALLE SERVICIO"
End With
With MSFlexGrid1
For FilaFlex = 1 To .Rows - 1
xlApli.Cells(FilaExcel, 2) = .TextMatrix(FilaFlex, 1)
xlApli.Cells(FilaExcel, 3) = .TextMatrix(FilaFlex, 3)
xlApli.Cells(FilaExcel, 4) = .TextMatrix(FilaFlex, 4)
xlApli.Cells(FilaExcel, 5) = .TextMatrix(FilaFlex, 5)
FilaExcel = FilaExcel + 1
Next
End With
xlApli.Columns.AutoFit
With xlApli
.Sheets(1).Activate
Columns("B:B").ColumnWidth = 24
End With
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
With xlApli.ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.196850393700787)
.RightMargin = Application.InchesToPoints(0.196850393700787)
.TopMargin = Application.InchesToPoints(0.393700787401575)
.BottomMargin = Application.InchesToPoints(0.393700787401575)
.CenterHorizontally = True
.Orientation = xlLandscape
End With
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
xlApli.Visible = True
Set xlApli = Nothing
End Sub