View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
debartsa debartsa is offline
external usenet poster
 
Posts: 18
Default Dynamically adding an in-cell drop-down list (i.e. Validation Object) to a cell?

Hi everybody,

I'm using Excel 97 with VBA to dynamically add a Validation object to
cell("A7").
My goal is to have an in-Cell dropdown list display when a user selects the
cell...

With ThisWorkbook.ActiveSheet.Range("A7").Validation
.Add Type:=xlValidateList, Formula1:="Red,Green,Blue"
End With

I get a Run-time error='1004' Application Defined or object-defined error?

Can I dynamically add a in-cell drop down list to a cell?


Thanks for any help!
Sam