bsht = bBk.Sheets("MISC2")
to2 = bsht.Range("A1")
asht = abk.Sheets("MISC2")
from = asht.Range("A1:IV2000")
Sheet14.Activate()
Sheet14.Select()
Sheet14.Application.Selection.Locked = False
Sheet14.Application.Selection.FormulaHidden = False
Sheet14.Application.Selection.SpecialCells(Excel.XlCellType.xlCellTypeFormulas, 23).Select()
Sheet14.Application.Selection.Locked = True
Sheet14.Application.Selection.FormulaHidden = False
Sheet14.Protect()
from.Copy(to2)
The above should protect the cells but it fails on the last line and says that the cells are protected. Is it possible to protect just the cells which contain formulas?
Anyone any idea
Bookmarks