What's wrong on the function below. Excel.exe*32 not closing in task manager.
Function formatExcel()
Dim FileName As String
FileName = "C:\This file\queryCentering.xlsx"
Set xl = New Excel.Application
Set wb = xl.Workbooks.Open(FileName)
With wb.Sheets(1)
Columns("E:E").Select
Selection.NumberFormat = "m/d/yyyy"
Columns("C:C").HorizontalAlignment = xlCenter
Rows("2:2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.RowHeight = 15
End With
wb.Save
wb.Close True
Set wb = Nothing
xl.Quit
Set xl = Nothing
End Function
Selection.RowHeight = 15? Seems like the end result is to select some cells but what happens with that?