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 |
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 |
All times are GMT +1. The time now is 08:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com