Dear Sir/Madam,
I have a report to transfer in excel format, but the heading of the report is not taken, is there any method to get the title of the report in the 1st rown of excel sheet.
MY VBA CODE is
Private Sub CMDFB_Click()
Dim strReportName As String
Dim strPathUser As String
Dim strFilePath As String
strReportName = "RFINAL_BILLS"
strPathUser = Application.CurrentProject.Path & "\REPORTS"
strFilePath = strPathUser & strReportName & Format(Date, "yyyymmdd") & ".xls"
'export to excel
DoCmd.OutputTo acOutputReport, strReportName, acFormatXLS, strFilePath
'launch excel file
Dim Shex As Object
Set Shex = CreateObject("Shell.Application")
Shex.Open (strFilePath)
End Sub
I have a report to transfer in excel format, but the heading of the report is not taken, is there any method to get the title of the report in the 1st rown of excel sheet.
MY VBA CODE is
Private Sub CMDFB_Click()
Dim strReportName As String
Dim strPathUser As String
Dim strFilePath As String
strReportName = "RFINAL_BILLS"
strPathUser = Application.CurrentProject.Path & "\REPORTS"
strFilePath = strPathUser & strReportName & Format(Date, "yyyymmdd") & ".xls"
'export to excel
DoCmd.OutputTo acOutputReport, strReportName, acFormatXLS, strFilePath
'launch excel file
Dim Shex As Object
Set Shex = CreateObject("Shell.Application")
Shex.Open (strFilePath)
End Sub