Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to open a password protected file

Posted on 2013-01-28
3
Medium Priority
?
384 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 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

IF you are either unfamiliar with rootkits, or want to know more about them, read on ....
It is a real story and is one of my scariest tech experiences. Most users think that IT experts like us know how to fix all computer problems. However, if there is a time constraint and you MUST not fail the task or you will lose your job, a simple …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

886 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