How can I list the properties of a validation box?

MPW

Well-known Member
Joined
Oct 7, 2009
Messages
571
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I would like to list all the specs of a validation box.
Details like:
Validation Criteria
The range it uses or list info
Input Message
Error Alert info
etc.

I would also like to know how to apply these kind of attributes to a cell.

Thanks
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
The Validation property of a range returns a Validation object, which has all the properties you want - you can view them all in the Object Browser.
 
Upvote 0
So something like:
Code:
With Range("A1")
   .AlertStyle:=xlValidAlertWarning
   .ErrorMessage = "Don't do that!"
   .etc

I have played around with the object browser before but really wasn't too clear on what to do with it. Other than the 'Helps' is there a quick way to understand each item? For instance, IMEMode

Anyway thanks for pointing the way, I should be able to muddle through it now.

MPW
 
Upvote 0
If you select Validation in the left hand list in the OB you will see all its properties and methods in the right hand list. You don't actually want to view the properties of the dropdown, but of the Validation object
 
Upvote 0
Thanks for the info.

Is there a good way to test whether a cell has validation like you would for a formula?
HasFormula = True

HasValidation = True
 
Upvote 0
Not that I know of - you have to check a property like Type within an error handler, if I remember rightly. (don't have Excel here)
 
Upvote 0

Forum statistics

Threads
1,224,560
Messages
6,179,520
Members
452,922
Latest member
nstaab07

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top