[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2169
  • Last Modified:

Receiving run-time error '3161'. Could not decrypt file trying to do DoCmd.TransferSpreadsheet in Access 2003

I have an access aplication that parses through a list of excel files to populate an access table on a weekly basis

The excel files (which are in the same format) come from our various shops spread out across the country.

The process has been working great until this week's run of the appplication.

An attempt to process the following statement for only a few of the files

                    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _
                    strTable, strPathFile, blnHasFieldNames, objExcel.Worksheets(lngCount).name & strTransferSpreadSheetRange

results in a run-time error '3161'. Could not decrypt file.

The remainder of the files have no problem.

Does anyone know of a recent windows xp pro and/or office 2003 update that may be causing this?

Visually all the files look to be in the same format.

If we copy the data into a different spreadsheet.  The error does not happen.

0
johnnyg123
Asked:
johnnyg123
  • 2
  • 2
1 Solution
 
ldunscombeCommented:
Could it be that one or more of your spreadsheets are excel version 2007 ? ie .xlsx
Leigh
0
 
oldmanbimCommented:
Is the file you are trying open password protected?
0
 
johnnyg123Author Commented:
After further questions to the user, it appears the files were worked on a home computer with excel 2007 but then saved as an excel version 2003.  Could this make a difference?

Also, the files are all password protected but only a few are having issues.  (Again, it appears the ones that were edited in 2007 and then saved as 2003)
0
 
ldunscombeCommented:
Only Guessing here but it would appear to me that while 2007 can save a file in 2003 format it would appear that it also has different encryption settings for password protected files that apparently it does not convert to 2003 format.
Try opening one of the files with excel  2003 and saving it as a different file.
If that doesn't work try doing the same "Removing the password"
Leigh
0
 
johnnyg123Author Commented:
You were correct 2007 does do things a bit differently when it comes to security

Thanks!
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now