View Single Post
  #2 (permalink)  
Old November 6th, 2003, 05:52 AM
pgtips pgtips is offline
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Here's a bit of VBS that will unprotect a worksheet:
Code:
Dim objExcel
Set objExcel = WSript.CreateObject("Excel.Application")
objExcel.Workbooks.Open "<<file name and path here>>"
objExcel.ActiveSheet.Unprotect Password:="<<password here>>"
objExcel.Workbooks(1).Save
objExcel.Workbooks.Close
Set objExcel = Nothing
hth
Phil
Reply With Quote