what I have done is the following (the exact syntax might be different for you, depending on the development environment that you are using):
-
when you create the sheet, release the ranges that you do not want to protect. I used a command like xlWrkshtDotNet.Range(UseRange).Style.Protection.SetLocked(FALSE) for this, where UseRange is a variable, containing the cell, column or row that you do not want to protect. I have used this command every time I had a cell or range that I did not want to protect during the creation process (find that easier than doing it at the end)
-
at the end of the process of creating the sheet I used xlWrkshtDotNet.Protect(GetPassword) to protect the entire sheet, but the range(s) that I had specified in the first command SETLOCKED(FALSE) will not be protected by this command. I used a function GetPassword to make it possible to dynamically set a document-specific password (it's return variable is a password).