Unable to Rid Of Cell Validation

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,564
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have a cell with a list type cell validation, and I am unsuccessful with getting rid of it with this code.

Code:
With ws_staffrec.Range("H6")
      .Validation.Delete
End With

After this code executes, the drop down list of the validation still exists. How do I get rid of the validation?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Are you pointing to the correct cell & sheet? As that code should remove the data validation.
 
Upvote 0
Yes. It is the both the correct sheet and cell. Could it be because the cell is a merged cell Fluff?
 
Upvote 0
Very possibly, what happens if you unmerge it?
 
Upvote 0
Hello Fluff,
Yes ... that was indeed the problem. I had to unmerge before I could delete the validation, and remerge.

Thanks for the support.
 
Upvote 0
You're welcome & thanks for the feedback.

Yet another reason to avoid merged cells like the plague ;)
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,746
Members
449,050
Latest member
excelknuckles

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