Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default .Protect ET .Validation.ShowInput

j'ai une feuille protégée (à chaque ré-ouverture) avec l'option:
ActiveSheet.Protect UserInterfaceOnly:=True, DrawingObjects:=True,
Contents:=True, Scenarios:=True

donc normalement le code peut modifier la feuille sans problème.

Sauf que quand j'essaye de modifier sur certaines cellules la propriété
suivante:
.Validation.ShowInput = True

eh bien... ça plante.
Désactiver totalement la protection (ActiveSheet.Unprotect) corrige le
problème et la modification se passe parfaitement bien.
Est-ce normal ? Qu'est-ce que j'oublie ?
Y'a-t-il une option de plus à ajouter à Protect pour obtenir que le code
puisse modifier les validations ?


--
David C.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default .Protect AND .Validation.ShowInput EN

I have a sheet re-protected (at each activation) with the options:
ActiveSheet.Protect UserInterfaceOnly:=True, DrawingObjects:=True,
Contents:=True, Scenarios:=True

So, the code is supposed to be abble to change the cells...

But, when I try to change this properties on cells:
.Validation.ShowInput = True
then... error !

Unprotecting the sheet is a solution (ActiveSheet.Unprotect)
and then I can change the Validation propertie

Is this supposed to happen ? Am i forgetting something ?
Is there an other option missing in the protect method ?

--
David C.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default .Protect AND .Validation.ShowInput EN

Hi David,

Is this supposed to happen ? Am i forgetting something ?



I forgot to add that using the UseInterfaceOnly argument permits various
code manipulation of a protected sheet. However, this argument does not
provide access to everything that would be possible on an unprotected sheet

Is there an other option missing in the protect method ?


Not to my knowledge in xl2k and earlier. I cannot speak for later versions.

---
Regards,
Norman


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default .Protect ET .Validation.ShowInput

Hi David,

Try:

ActiveSheet.UnProtect

'Your validation code

ActiveSheet.Protect UserInterfaceOnly:=True, _
DrawingObjects:=True, _
Contents:=True, Scenarios:=True


---
Regards,
Norman




"David C." wrote in message
...
j'ai une feuille protégée (à chaque ré-ouverture) avec l'option:
ActiveSheet.Protect UserInterfaceOnly:=True, DrawingObjects:=True,
Contents:=True, Scenarios:=True

donc normalement le code peut modifier la feuille sans problème.

Sauf que quand j'essaye de modifier sur certaines cellules la propriété
suivante:
.Validation.ShowInput = True

eh bien... ça plante.
Désactiver totalement la protection (ActiveSheet.Unprotect) corrige le
problème et la modification se passe parfaitement bien.
Est-ce normal ? Qu'est-ce que j'oublie ?
Y'a-t-il une option de plus à ajouter à Protect pour obtenir que le code
puisse modifier les validations ?


--
David C.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default .Protect ET .Validation.ShowInput

Well; sure...
but because of a password (in later use) I'd prefer not to use that way...
Well...
thank you.




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
Protect validation but allow drop down selection Paul07 Excel Discussion (Misc queries) 1 August 20th 09 12:56 PM
Protect Validation from Copy Paste function chris Excel Worksheet Functions 0 April 6th 09 09:24 PM
Protect List Validation Cells Kenny Excel Discussion (Misc queries) 3 October 2nd 07 06:48 AM
protect validation messages tikchye_oldLearner57 Excel Discussion (Misc queries) 1 April 12th 07 01:23 PM
how to password protect a validation list? Andrew Excel Discussion (Misc queries) 14 December 20th 06 07:29 PM


All times are GMT +1. The time now is 12:53 PM.

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"