View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
MattShoreson[_47_] MattShoreson[_47_] is offline
external usenet poster
 
Posts: 1
Default VBA - Check for password protection


I have written code to filesearch and then trawl the workbooks for any
comments containing a particular string.

However when the code is running, if a sheet is password-protected it
prompts.

Is there any way of checking to see if a file is PP'd without actually
trying to open it and therefore getting prompted?

code is as below:

Set oBook = oExcel.Workbooks.Open(strWkShtPathAndNme, 0, True)

CIA,
Matt.


--
MattShoreson
------------------------------------------------------------------------
MattShoreson's Profile: http://www.excelforum.com/member.php...fo&userid=3472
View this thread: http://www.excelforum.com/showthread...hreadid=480862