Protected sheet question -- way to allow user to change text alignment and font style?

  • Thread starter Thread starter StargateFanFromWork
  • Start date Start date
S

StargateFanFromWork

When we use this code:

ActiveSheet.Protect

(which works perfectly in every other respect), the user cannot change the
text alignment nor the font style (bold, italic, etc.) without unprotecting
the sheet.
Yet rather than have a button or toolbar to do these things, as wondering if
there was an easy line of code that would protect the sheet in every respect
that ActiveSheet.Protect does but leaving those 2 things available? Is this
do-able. Just curious.

Thanks! :oD
 
That depends on your version of XL if you have 2002 or better then you can
try this...

activesheet.Protect AllowFormattingCells:=True
 
Jim Thomlinson said:
That depends on your version of XL if you have 2002 or better then you can
try this...

activesheet.Protect AllowFormattingCells:=True

Oops, sorry. I keep forgetting to say version. I have XL2K ... Will the
above work with this version??

Thanks!
 
StargateFanFromWork said:
Oops, sorry. I keep forgetting to say version. I have XL2K ... Will the
above work with this version??

I tried this out and it naturally doesn't work in XL2K. Is there an
alternative for those of us with older XL versions?

Thanks! :oD
 
Jim Thomlinson said:
That depends on your version of XL if you have 2002 or better then you can
try this...

activesheet.Protect AllowFormattingCells:=True

Does no answer mean there's nothing we can do in XL2K? <g>

Thanks. :oD
 
You could write your own macros that allow only the formatting that you want to
support.

unprotect the sheet
do the formatting you want
protect the sheet
 
Back
Top