This Excel VBA macro removes all the data-validations from an active worksheet.
Sub RemoveDataValidations_ActiveSheet() Cells.Validation.Delete End Sub
We need only just following code:
The Application.Cells property returns the Range object represents ALL ranges on the active sheet.
So we don’t have to loop through.
The Cells property is a member of the Excel.Global class, so we can omit the Application property, .
The Range.Validation property returns the Validation object.
And we can remove data-validations by the Validation.Delete method.
- Excel 2013
- Excel 2010
- Excel 2007