View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ZoomZoom ZoomZoom is offline
external usenet poster
 
Posts: 1
Default Excel VBA programmatic validation problem

Hi, newbie post here - I've trawled the archives and can't seem to fin
an answer to my problem.
I'm using Win2000/Excel 2000/VB6

Basically I'm trying to add drop down list style validation to a cell.
I believe this should be possible using the validation parameter of
range:

Range("e5").Validation.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, _
Formula1:=txt

Where text is a comma separated string ("M,F" in this case)

Every attempt to use validation in such a way gives the error
"Run-Time error '1004': Application-defined or object-defined error".
I've played with many variations on the above syntax, and the sam
error message always results.

Any ideas what I need to do to get this working? Might it be m
references or something like that

--
Message posted from http://www.ExcelForum.com