I have succesfully exported an Access report to Excel and then opened it, now i want to format it:
Not sure how to perform the formatting now it is open...
I basically want to resize all the columns, create a header and place a few cells in bold.
Take resizing the columns, i know the code from the excel document would be:
I'm just not sure how to prefix it as simply putting that code in doesn't work.
Any ideas out there?????
Code:
Private Sub Command2_Click()
Dim Date1
Dim stReportAddress As String
Date1 = Format(Date, "dd-mm-yyyy")
stReportAddress = "c:\my documents\siobhan\Employer Funding Report - By Employer (" & Date1 & ").xls"
'Export Report
DoCmd.OutputTo acOutputReport, "Employer Funding Report (By Employer)", acFormatXLS, stReportAddress
'Open Report
Application.FollowHyperlink stReportAddress
End Sub
I basically want to resize all the columns, create a header and place a few cells in bold.
Take resizing the columns, i know the code from the excel document would be:
Code:
Cells.Select Cells.EntireColumn.AutoFit
Any ideas out there?????
Comment