View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default data validation syntax

Your problem is in this line:
Set ProdRange = Range("a7", "a" & Range("EndOfProducts").Offset(-2, 0).Row)
Maybe should be:
Set ProdRange = Range("a7":"a" & Range("EndOfProducts").Offset(-2, 0).Row)
"Nigel" wrote:

im having trouble figuring out what is wrong with this code....
it should use the range set to the variable ProdRange as the source for
the data, and putting the drop down list in cell A3.....

Dim ProdRange As Range
Set ProdRange = Range("a7", "a" & Range("EndOfProducts").Offset(-2,
0).Row)
Range("a3").Validation.Add xlValidateList, , , "=" &
ProdRange.Address

anyone know what im doing wrong?