problema al Aliner las celdasIzqueirda, centrarm, derecha
gracias por la yuda desde ya..
Código:
Private Sub ExportarListadoMSExcel()
Dim AppExcel As Object
Set AppExcel = CreateObject("Excel.application")
With AppExcel
.Visible = True
.Workbooks.Add '' Agregamos un Libro Nuevo
Dim nFila As Integer
nFila = 1 '' Agregos los titulos a nuestra columnas
.Cells(nFila, 1) = "Id"
.Cells(nFila, 2) = "Pais"
.Cells(nFila, 3) = "Estado"
Dim i As Long
For i = 1 To Me.ListView1.ListItems.Count
nFila = nFila + 1
.Cells(nFila, 1) = Me.ListView1.ListItems(i).Text
.Cells(nFila, 2) = Me.ListView1.ListItems(i).ListSubItems(1).Text
.Cells(nFila, 3) = Me.ListView1.ListItems(i).ListSubItems(2).Text
Next i
.range("A1:C1").Font.Bold = True
.range("A1:C1").Interior.Color = RGB(192, 200, 200)
.Cells.EntireColumn.AutoFit
'' ************* ERROR AL ALINEAR ayuda porfa.. **********************
.Range("C1").TextAlign = fmTextAlignCenter
.Range("A1:H1").HorizontalAlignment = xlCenter
.cell(1,).TextAlign = fmTextAlignCenter
'' ************************************************
.ActiveWorkbook.SaveAs App.Path & "listado.xls" ''Guardas la hoja actual
End With
End Sub