I'm beating my head on this and wanted to take a step back. I've written a script that opens a workbook, protects the sheet with a password, and saves it to another folder on a network share. Fine and dandy the first time.
When the script runs a second or third time, excel gives the fun error "locked for editing." On the file server, the file isn't seen as open.
Any ideas??? Thanks in advance!!
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("\\Server\share on server\test.xls")
Set objWorksheet = objWorkbook.Worksheets(1)
objExcel.Visible = True
objExcel.DisplayAlerts = True
objWorkbook.SaveAs "\\Server\share on server\test-123.xls"