Locking commands

  • 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 ran:
The user can't:
insert/delete rows or columns
change certain cells/rows/columns values

Thank you,
LC
 
It sounds like your macro should protect the worksheet. And maybe lock some
cells before the protection.

You can lock a cell by selecting it, format|cells|Protection tab|

And you can protect a worksheet by Tools|Protection|protect sheet.

(and if you want your macro to do it, record a macro when you do it once and
steal that recorded code.)

That said, worksheet protection is very weak. There's code posted here every
day/week that would unprotect the worksheet.
 
Back
Top