ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protected sheet question -- way to allow user to change text alignment and font style? (https://www.excelbanter.com/excel-programming/397217-protected-sheet-question-way-allow-user-change-text-alignment-font-style.html)

StargateFanFromWork[_3_]

Protected sheet question -- way to allow user to change text alignment and font style?
 
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



Jim Thomlinson

Protected sheet question -- way to allow user to change text align
 
That depends on your version of XL if you have 2002 or better then you can
try this...

activesheet.Protect AllowFormattingCells:=True
--
HTH...

Jim Thomlinson


"StargateFanFromWork" wrote:

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




StargateFanFromWork[_3_]

Protected sheet question -- way to allow user to change text align
 
"Jim Thomlinson" wrote in message
...
That depends on your version of XL if you have 2002 or better then you can
try this...

activesheet.Protect AllowFormattingCells:=True
--
HTH...


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

Thanks!


Jim Thomlinson


"StargateFanFromWork" wrote:

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






StargateFanFromWork[_3_]

Protected sheet question -- way to allow user to change text align
 
"StargateFanFromWork" wrote in message
...
"Jim Thomlinson" wrote in
message ...
That depends on your version of XL if you have 2002 or better then you
can
try this...

activesheet.Protect AllowFormattingCells:=True
--
HTH...


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

Thanks!


Jim Thomlinson


"StargateFanFromWork" wrote:

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








StargateFanFromWork[_3_]

Protected sheet question -- way to allow user to change text align
 
"Jim Thomlinson" wrote in message
...
That depends on your version of XL if you have 2002 or better then you can
try this...

activesheet.Protect AllowFormattingCells:=True
--
HTH...

Jim Thomlinson


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

Thanks. :oD

"StargateFanFromWork" wrote:

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






Dave Peterson

Protected sheet question -- way to allow user to change text align
 
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



StargateFanFromWork wrote:

"Jim Thomlinson" wrote in message
...
That depends on your version of XL if you have 2002 or better then you can
try this...

activesheet.Protect AllowFormattingCells:=True
--
HTH...

Jim Thomlinson


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

Thanks. :oD

"StargateFanFromWork" wrote:

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




--

Dave Peterson


All times are GMT +1. The time now is 08:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com