D
Doug F.
I want to export data to a password protected spreadsheet.
I found some code and this is where I am so far.
Am I close or wrong direction? Thanks.
Dim oExcel As Object, oWb As Object
Set oExcel = CreateObject("Excel.Application")
Set oWb = oExcel.Workbooks.Open(FileName:=strFile, Password:=strPassword)
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel3, "myQry",
strFile, -1
oWb.Close SaveChanges:=False
oExcel.Quit
Set oExcel = Nothing
I found some code and this is where I am so far.
Am I close or wrong direction? Thanks.
Dim oExcel As Object, oWb As Object
Set oExcel = CreateObject("Excel.Application")
Set oWb = oExcel.Workbooks.Open(FileName:=strFile, Password:=strPassword)
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel3, "myQry",
strFile, -1
oWb.Close SaveChanges:=False
oExcel.Quit
Set oExcel = Nothing