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

  • Thread starter StargateFanFromWork
  • 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! :blush:D
 
G

Guest

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

activesheet.Protect AllowFormattingCells:=True
 
S

StargateFanFromWork

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!
 
S

StargateFanFromWork

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! :blush:D
 
S

StargateFanFromWork

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. :blush:D
 
D

Dave Peterson

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
 

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

Top