Maybe its this line:
Code:
objExcel.ActiveSheet.Unprotect Password:="<<password here>>"
The code I pasted was
VB and I'm pretty sure VBScript doesn't support named arguments, so change it to
Code:
objExcel.ActiveSheet.Unprotect "<<password here>>"
I'm confused though, the original would just give you a syntax error, unless you have On Error Resume Next I guess ?
hth
Phil