Hi

If you do not have a specific range to lock, put A1:XFD1048576 in the variable RangeToLock.