Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default setting the protect option

I have a worksheet that has protection switched on. When a certain routine is
run I need to turn the protection off do the routine then turn it back on
again.

When I initially protect the worksheet I need to set the Edit Objects so
that my routines will run properly.

Unfortunately I can't seem to set that back on again when I turn the protect
back on inside my code.

Is there a way to turn the protect back on and use edit object from within
VBA?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 183
Default setting the protect option

This is the code I generally use

'Unprotect
ActiveSheet.Unprotect password:="XXX"

'Protect
With ActiveSheet
.EnableSelection = xlNoRestrictions
.Protect Contents:=True, password:="XXX", DrawingObjects:=True,
UserInterfaceOnly:=False
End With





--
caroline


"Keith" wrote:

I have a worksheet that has protection switched on. When a certain routine is
run I need to turn the protection off do the routine then turn it back on
again.

When I initially protect the worksheet I need to set the Edit Objects so
that my routines will run properly.

Unfortunately I can't seem to set that back on again when I turn the protect
back on inside my code.

Is there a way to turn the protect back on and use edit object from within
VBA?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default setting the protect option

Yes but I cant seem to find a command for setting the EditObject part of
protect.

"caroline" wrote:

This is the code I generally use

'Unprotect
ActiveSheet.Unprotect password:="XXX"

'Protect
With ActiveSheet
.EnableSelection = xlNoRestrictions
.Protect Contents:=True, password:="XXX", DrawingObjects:=True,
UserInterfaceOnly:=False
End With





--
caroline


"Keith" wrote:

I have a worksheet that has protection switched on. When a certain routine is
run I need to turn the protection off do the routine then turn it back on
again.

When I initially protect the worksheet I need to set the Edit Objects so
that my routines will run properly.

Unfortunately I can't seem to set that back on again when I turn the protect
back on inside my code.

Is there a way to turn the protect back on and use edit object from within
VBA?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 183
Default setting the protect option

Why not setting the individual object property to unlock?
--
caroline


"Keith" wrote:

Yes but I cant seem to find a command for setting the EditObject part of
protect.

"caroline" wrote:

This is the code I generally use

'Unprotect
ActiveSheet.Unprotect password:="XXX"

'Protect
With ActiveSheet
.EnableSelection = xlNoRestrictions
.Protect Contents:=True, password:="XXX", DrawingObjects:=True,
UserInterfaceOnly:=False
End With





--
caroline


"Keith" wrote:

I have a worksheet that has protection switched on. When a certain routine is
run I need to turn the protection off do the routine then turn it back on
again.

When I initially protect the worksheet I need to set the Edit Objects so
that my routines will run properly.

Unfortunately I can't seem to set that back on again when I turn the protect
back on inside my code.

Is there a way to turn the protect back on and use edit object from within
VBA?

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
Mofiying the protect option. Gizmo63 Excel Worksheet Functions 6 December 4th 09 10:18 PM
setting up option buttons gw Excel Worksheet Functions 1 June 20th 07 01:43 PM
Setting an option control Patrick Simonds Excel Programming 1 April 4th 06 03:25 AM
How to protect option button? Julie Excel Programming 4 March 28th 05 03:06 PM
How to protect option button? Julie Excel Worksheet Functions 1 March 23rd 05 03:42 AM


All times are GMT +1. The time now is 02:34 AM.

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

About Us

"It's about Microsoft Excel"