Hello,
with help of many folks on this website I was able to export many queries into different tabs on excel. However i am stuck at how i can format excel. Currently my code only formats the first line in excel but after that is done, i would like it to format the entire sheet with the following
font - Tahoma
size - 10
does anyone know how i can accompish this?
xlBook.Worksheets(intCurrentSheet).Activate
With xlApp.ActiveSheet
.Columns.Select
.Columns.EntireColumn.AutoFit
.Rows.Select
.Rows(1).Font.Bold = True
.Rows(1).Font.Size = 10
.Rows(1).Font.Name = "Verdana"
.Range("A1").Select 'Selects first cell to deselect the rest of the sheet.
End With
intCurrentSheet = intCurrentSheet + 1
Loop
xlBook.Worksheets(1).Activate 'Returns the selection to the first worksheet.
with help of many folks on this website I was able to export many queries into different tabs on excel. However i am stuck at how i can format excel. Currently my code only formats the first line in excel but after that is done, i would like it to format the entire sheet with the following
font - Tahoma
size - 10
does anyone know how i can accompish this?
xlBook.Worksheets(intCurrentSheet).Activate
With xlApp.ActiveSheet
.Columns.Select
.Columns.EntireColumn.AutoFit
.Rows.Select
.Rows(1).Font.Bold = True
.Rows(1).Font.Size = 10
.Rows(1).Font.Name = "Verdana"
.Range("A1").Select 'Selects first cell to deselect the rest of the sheet.
End With
intCurrentSheet = intCurrentSheet + 1
Loop
xlBook.Worksheets(1).Activate 'Returns the selection to the first worksheet.