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.
 
Back
Top