Solved

How to open a password protected file

Posted on 2013-01-28
3
372 Views
Last Modified: 2013-01-28
Hi Exparts,
I have a excel file to create reports from different sheets of the excel workbook and some infromation from an external worksheet.
But the external worksheet is password protected therefore, each time excel refresh data in every 20 miniutes try to open the extarnal excel sheet every its stop there to choose as read only. Is there any way to bypass this message while open the external excel worksheet.
 I wrote as below but still stopped "Enter password for write access,or open read only"  
Set wb_Source = xl.Workbooks.Open(FileName, IgnoreReadOnlyRecommended:=True)

Please advise how bypass this message while opening password protected worbook to get some information.

Thanks
0
Comment
Question by:alam747
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
redmondb earned 500 total points
ID: 38829620
Hi, alam747.

What about including ReadOnly:=True as well?

Edit: So your line becomes...
Set wb_Source = xl.Workbooks.Open(FileName, IgnoreReadOnlyRecommended:=True, ReadOnly:=True)

Regards,
Brian.
0
 

Author Closing Comment

by:alam747
ID: 38829694
Thanks a lot, it works
0
 
LVL 26

Expert Comment

by:redmondb
ID: 38829711
Thanks, alam747.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Several part series to implement Internet Explorer 11 Enterprise Mode
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

705 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now