您把.SpecialCells(xlCellTypeconstants,23).Locked = True改成.SpecialCells(xlCellTypeVisible).Locked = True试试看是不是您想要的效果。有问题继续追问讨论,相互学习!