Debes de dar alta la referencia de excel (Menu Proyectos-->Referencias)dependiendo que version de office tengas debe haber una con el nombre:
Microsoft Excel 11.0 Object Library
Nota. Lo que varia es la versión.
Private Sub Command2_Click()
Dim ApExcel As Excel.Application
Set ApExcel = CreateObject("Excel.application")
ApExcel.Workbooks.Add
With ApExcel
.Cells(1, 1) = "Prueba"
.Cells(1, 2) = "Prueba2"
.Cells(2, 1) = "Prueba3"
.Cells(2, 2) = "Prueba4"
.Range("A1:B10").Font.Color = vbRed 'Color de Letra
.Range("A1:B10").HorizontalAlignment = xlHAlignCenter 'Centrado Hor.
.Range("A1:B10").VerticalAlignment = xlHAlignCenter 'Centrado Vert.
.Range("A1:B10").Font.Name = "Tahoma" 'Nombre Letra
.Range("A1:B10").Font.Size = 11 'Tamaño
.Range("A1:B10").Font.Bold = True 'Negrita
.Range("A1:B10").Font.Italic = True 'Cursiva
.Range("A1:B10").Interior.Color = vbYellow 'Color de Relleno
'Poner Border
' 'XlLineStyle: xlContinuous, xlDash, xlDashDot, xlDashDotDot, xlDot, xlDouble, xlSlantDashDot o xlLineStyleNone
.Range("A1:B10").Borders.LineStyle = xlContinuous
End With
With ApExcel.Range("A1:B10")
.HorizontalAlignment = xlHAlignLeft
.VerticalAlignment = xlHAlignCenter
.WrapText = True 'Ajustar Celda al Tamañao del Texto
End With
'
ApExcel.AlertBeforeOverwriting = False
ApExcel.ActiveWorkbook.SaveAs "C:\Prueba.xls"
ApExcel.Visible = True
'
Set ApExcel = Nothing
'
End Sub