Data Validation

pincivma

Board Regular
Joined
Dec 12, 2004
Messages
206
Hi again
I have many rows with data validation. Sometimes I want to select an item in the list to enter into the cell. When I enter an item that is not in the list I get a message that the item I entered is not in the list. So I then have to go to DATA>DATA VALIDATION>ERROR ALERT and uncheck the box. I have to do this for may rows. My question is this. Is there a global control setting which could look at every cell with data validation in the entire workbook or worksheet and uncheck that box. If not is there a macro that can uncheck that error alert box for every row that has a data validation list.
Thanks
 
HI Joe
I finally got your macro to work but it takes forever to run due to many worksheets and many DV cells. Not all worksheets have DV cells. So my plan is to only run the macro on only on those sheets that have DV cells. I used your macro and redid it for only one worksheet but the macro did not work. Here is the code. Maybe I'm missing something.

Sub RemoveErrorMessageOnDVCellsMyVersion()
Dim Wsht As Worksheet, DVCells As Range
Application.ScreenUpdating = False
On Error Resume Next
Set DVCells = Wsht.Cells.SpecialCells(xlCellTypeAllValidation)
On Error GoTo 0
If Not DVCells Is Nothing Then
For Each c In DVCells
With c.Validation
.ShowError = False
End With
Next c
End If
Application.ScreenUpdating = True
End Sub
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,216,105
Messages
6,128,861
Members
449,472
Latest member
ebc9

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