Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default Test if a file is password protected

I have a process that sequentially opens and processes all xls files in a
chosen folder. This works OK, however if I come across a file with a
password open protection, I wish to detect it, then pass over these files.

I am using the following to open each file

Set wB = Workbooks.Open(myFile)

If the file has an open password I get the standard dialog to enter a
password.

How can I avoid this by detecting a the file is password protected?

--

Regards,
Nigel




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Test if a file is password protected

i searched the newsgroup quickly & it seems you can't just determine
whether or not it has a password - you have to try to open it & let it
tell you, then deal with the "consequences". this thread might have
some help for you....


http://groups.google.com/group/micro...6d550f97240fb3


hth
susan

On Dec 27, 8:53*am, "Nigel" wrote:
I have a process that sequentially opens and processes all xls files in a
chosen folder. *This works OK, however if I come across a file with a
password open protection, I wish to detect it, then pass over these files.

I am using the following to open each file

Set wB = Workbooks.Open(myFile)

If the file has an open password I get the standard dialog to enter a
password.

How can I avoid this by detecting a the file is password protected?

--

Regards,
Nigel


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default Test if a file is password protected

Thanks, useful.

--

Regards,
Nigel




"Susan" wrote in message
...
i searched the newsgroup quickly & it seems you can't just determine
whether or not it has a password - you have to try to open it & let it
tell you, then deal with the "consequences". this thread might have
some help for you....


http://groups.google.com/group/micro...6d550f97240fb3


hth
susan

On Dec 27, 8:53 am, "Nigel" wrote:
I have a process that sequentially opens and processes all xls files in a
chosen folder. This works OK, however if I come across a file with a
password open protection, I wish to detect it, then pass over these files.

I am using the following to open each file

Set wB = Workbooks.Open(myFile)

If the file has an open password I get the standard dialog to enter a
password.

How can I avoid this by detecting a the file is password protected?

--

Regards,
Nigel


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XLS password protected file JacquesT Excel Discussion (Misc queries) 5 December 25th 08 02:02 PM
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. Daniel Excel Worksheet Functions 0 June 23rd 05 11:56 PM
bypass password when update linking of password protected file Yan Excel Discussion (Misc queries) 1 February 7th 05 11:29 PM
PASSWORD PROTECTED FILE Tom Ogilvy Excel Programming 2 September 10th 03 01:08 PM
Save protected file into unprotected file without password Paul Excel Programming 3 August 2nd 03 05:17 PM


All times are GMT +1. The time now is 03:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"