View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Linou[_4_] Linou[_4_] is offline
external usenet poster
 
Posts: 1
Default protection sheet and code ???


Hi,

I use this (below) to validate what is enter in different cells, it
work well except if I prodect my sheet with a password. The add part
doesn't work and I got and error 1004.

Someone have idea ?


With Range("F3").Validation
.Add Type:=xlValidateWholeNumber, _
AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="2001", Formula2:="2006"

.InputTitle = "Année :"
.ErrorTitle = "Integers"
.InputMessage = "entre 2001 et 2004"
.ErrorMessage = "Vous devez entrer une valeur numérique entre 2001
et 2006"
End


--
Linou
------------------------------------------------------------------------
Linou's Profile: http://www.excelforum.com/member.php...fo&userid=1990
View this thread: http://www.excelforum.com/showthread...hreadid=161551