Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default 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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default 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







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default 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







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to prevent Cut&Paste to change style and data validation on protected sheet Paulo Costa \(Live\) Excel Discussion (Misc queries) 1 March 23rd 10 12:19 PM
How to prevent Cut&Paste to change style and data validation on protected sheet Paulo Costa \(Live\) Excel Discussion (Misc queries) 2 March 23rd 10 05:17 AM
How to change font colour in unlocked cell of protected sheet Michelle Excel Discussion (Misc queries) 2 September 16th 08 05:58 PM
How do I change sheet notation from R1C1 style to A1 style in XL 2 Sherlock1506 Setting up and Configuration of Excel 1 December 5th 06 03:22 PM
change font when sheet is protected vivisss Excel Discussion (Misc queries) 1 February 7th 05 07:54 PM


All times are GMT +1. The time now is 03:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"