Solved

How to open a password protected file

Posted on 2013-01-28
3
380 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
[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 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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

717 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