Problems with Validation object Add and Modify methods
For some reason I can't make any sense out of the Validation object in Excel
(2003) - whenever I try to use the Add or Modify methods or fetch any of the
properties, I get one of the following generic errors (Can't quite figure out
what the pattern is for either one).
Run-time Error '1004': Application-defined or object-defined error
Run-time Error '-2147417848 (80010108)': Method 'Add' of object 'Validation'
failed
Example code I'm using:
Range("b1").Validation.Add xlValidateList, xlValidAlertStop, xlBetween,
"=$A$1:$A$10"
Any suggestions? I can't find enough info to establish when you would use
the Add method over the Modify method and whether there is something you have
to do before calling Add.
Cheers,
John
|