Locking a cell in vba excel -
Locking a cell in vba excel -
i want lock cell in vba excel. read previous answers , used them. cell not lock.!!!! code:
number = range("a1") if number < 5 cells(1, 1).locked = true else cells(1, 1).locked = false end if after subroutine runs cells(1,1) not protected.
locked cell become protected when switch protection worksheet. need add
cells(1, 1).worksheet.protect that makes locked cells protected (see example).
p.s. default cells are locked
excel-vba
Comments
Post a Comment