Expand|Select|Wrap|Line Numbers
- 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
- End With
- wb.Save
- wb.Close True
- Set wb = Nothing
- Set xl = Nothing
- xl.Quit
- End Function