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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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......
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top