protection sheet and code ???

L

Linou

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top