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

Popular posts from this blog

php - How to pass multiple values from url -

php - Laravel not returning controller -

c# - Confused on how to specify a Platform and Version while using ChromeOptions for RemoteWebDriver with Selenium donNet since recent updates -