Security...

  • Thread starter Thread starter LC
  • Start date Start date
L

LC

Hi!

I was wondering how I could prevent the user from changing
certain fields after a macro is run on a spreadsheet.

For example after the macro is run:
The user can't:
insert/delete rows or columns
change certain cells/rows/columns values

Thank you,
LC
 
Try this:
ActiveSheet.Protect (userinterfaceonly)

You have to lock certain cells ahead of time, which you can do manually.
Then, when activesheet.protect is run, users can't modify things. The
userinterfaceonly option allows subroutines to continue w/
modifications.

Cells.Locked = True
might be usefull too. I believe that it will allow you to do the
locking of certain cells from a subroutine.
 

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