79699643

Date: 2025-07-12 23:04:47
Score: 1
Natty:
Report link

This is en EXTREMELY annoying problem in Excel/VBA

If you do a msgbox with range("A1").validation.property if will throw an error for all of the properties except a few. application and creator are useless because I don't think they change. IMEMode will return a 0 but I don't think you wanna mess with that. A few of the others will return nothing but won't throw an error.

If you use an if statement like:

If range("a1").validation.ErrorTitle <> "" Then

You can apply an error title to your validation cells to see which ones have error validation and which ones don't. Hope that's helpful. Took me a few hours to figure this out. Would have been helpful if validation.value returned "false" if a user hadn't applied data validation. Bravo Micro$oft.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: wallybanger