[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Unprotect Excel File from Access

Posted on 2011-09-30
3
Medium Priority
?
303 Views
Last Modified: 2012-06-21
I have an Access DB that transfers data to an Excel file through the following code:
DoCmd.TransferSpreadsheet acExport, 8, "zLOA_List", "C:\WFReports_CG.xls", True, ""

I have recently protected the workbook and when execute the code above I get "could not decrypt the file"

Is there a way to unprotect the file from Access?
0
Comment
Question by:fitaliano
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 19

Accepted Solution

by:
Richard Daneke earned 2000 total points
ID: 36893989
I have good news and bad news.
The good news is that no password is needed with the DoCmd. TransferSpreadSheet
The bad news is that your password is preventing the computer from replacing your existing file.  So, you must leave the workbook unprotected.
If security is an issue, place the file in a folder with restricted permisssions.  Remember, whoever uses Access to create this exported spreadsheet will need create, read/write access to the folder.
0
 

Author Comment

by:fitaliano
ID: 36894130
I was actually thinking of calling Excel objects and unprotect the file from Access.

If I include Microsoft Excel Object Library in my VBE References I could do it, I just don't know how.
The command I want to trigger is:
ActiveWorkbook.Unprotect Password:="blablabla"

How do I specify the workbook to be called?

0
 
LVL 19

Expert Comment

by:Richard Daneke
ID: 36894976
That would be a great new question.

You can add Excel references to your Access VBA coding.  So, when you have an Active worksheet, you can use
ActiveWorkbook.Unprotect Password:="blablabla"
Yes, this would apply when opening an existing workbook.
The export would use ActiveWorkbook.Protect

Thank you for the grading and accepting my answer.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New style of hardware planning for Microsoft Exchange server.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question