[AccessD] Open Protected Excel via VBA

Hale, Jim Jim.Hale at FleetPride.com
Mon Jul 2 09:02:20 CDT 2007


If you meant protected sheets  within a workbook, 

appExcel.Sheets("instruc").Unprotect Password:=strPW

Works. If you meant to unprotect a Workbook try the following code
snippets:

   appexcel.Workbooks.Open strPath1 & "\" & strFilename, 0   
   appexcel.ActiveWorkbook.Unprotect Password:=strPW

Jim Hale



***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.




More information about the AccessD mailing list