Thread: Validation
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Kevin Kevin is offline
external usenet poster
 
Posts: 134
Default Validation - Part of problem solved

OK I found my spelling error, now I have a different
problem. My new code is as follows:

With Range("C2").Validation
.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, _
Formula1:="$Z$2:$Z$9"
.IgnoreBlank = True
.InCellDropdown = True
.InputMessage = "Select a Container"
.ErrorTitle = "Invalid Container"
.ErrorMessage = "You have entered an invalid data."

Now I get Runtime error 429, ActiveX Componenet can not
create object.

Hmmm!
-----Original Message-----
I need to be able to add and remove data validation from

a
particular dropdown list I have in my spreadsheet. Help
suggests something like the following:

With Range("C2").validate
.Add xlValidateList, xlValidAlertStop, "$Z$2:$Z$9"
.IgnoreBlank = True
.InCellDropdown = True
.InputMessage = "Select a Container"
.ErrorTitle = "Invalid Container"
.ErrorMessage = "You have entered an invalid

data."
End With

When I try to run this I get Runtime error 438, object
does not support this property or method. What is my
problem.

Thanks in advance!

Kevin

.