R
Rick A.B.
I use the following to export the results of a query to an excel
spreadsheet.
Private Sub btnXlsExport_Click()
Dim SheetName As String
SheetName = Me.FAATermID.Column(1) + "PData"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"qryFAAFG", "H:" & SheetName + ".xls"
MsgBox "The report has been exported to excel in your H: Drive and
named " & SheetName + ".xls"
End If
Because of the sensitive information contained in the data, I would
like to create the spreadsheet with a password. Is there a another
way of coding this from Access to automatically create the protected
spreadsheet?
Rick
spreadsheet.
Private Sub btnXlsExport_Click()
Dim SheetName As String
SheetName = Me.FAATermID.Column(1) + "PData"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"qryFAAFG", "H:" & SheetName + ".xls"
MsgBox "The report has been exported to excel in your H: Drive and
named " & SheetName + ".xls"
End If
Because of the sensitive information contained in the data, I would
like to create the spreadsheet with a password. Is there a another
way of coding this from Access to automatically create the protected
spreadsheet?
Rick