Validation through VBA using string has 255 char limit??????

A

Allan

Hi
I have some VBA that dynamically changes validation lists based on selections in the workbook. Due to the complexity of the data being referenced the lists are built up into strings like "blah1, blah2, blah3,blah4" they are tthen added with..

..Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=strLis

where strList is the string holding the list

the problem is that it fails consistently on some options. In those cases the list seems to be over 255 characters long

Is this a known limitation of using this method as opposed to a named range as the source? If so is there a way around it......
 
D

Debra Dalgleish

The delimited list has a maximum of 255 characters, whether you're
entering it manually, or programmatically. Perhaps you could write the
values to a range in the workbook, and reference that.
 
Top