I have some combined fields that I fill out when I open the book β the data source comes from the database.
I fill out my combo box by checking the data with the following code: -
With Selection.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=list .IgnoreBlank = False .InCellDropdown = True .ShowInput = True .ShowError = True End With
where list is a comma-separated string that I created from a set of database records.
All of this works great. The problem arises when I open the book again. I get an error
"Excel found unreadable content. Do you want to restore the contents of this file?
You say yes and excel then give you
"Excel was able to recover the file by deleting the functions"
And data verification from some Combo fields disappeared
I suspect that in some internet searches the string that I use for my data verification is too long?
I do not need to add recordset values ββto the hidden sheet and set the source of the data check for the range on the hidden sheet, since the combo boxes are dynamic and intermittent and change depending on the user's choice. I really need to be able to configure Data Validation to my string, which I created at various points of user interaction.
If this line is too long, can I add to the data validation or is there another trick I can use to get around this problem?
David source share