cell lock

  • Thread starter Thread starter kabulking
  • Start date Start date
K

kabulking

dearr
i have a sheet that is being updated from a form.
i want the button on the form to lock the cells in which data has been
entered and the empty cells remain unlock.

any help will be appreciated

thanks
naweed
 
ActiveSheet.Unprotect
set rng = ActiveSheet.Cells.SpecialCells(xlConstants)
rng.Locked = True
ActiveSheet.Protect
 
ActiveSheet.Unprotect
set rng = ActiveSheet.Cells.SpecialCells(xlConstants)
rng.Locked = True
ActiveSheet.Protect

--
Regards,
Tom Ogilvy







- Show quoted text -

it worked perfectly.
Thanks alot

best regards,
naweed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top