how to list all validation cells on a sheet

  • Thread starter Thread starter HCS
  • Start date Start date
H

HCS

hello,

i understand how to alter a validation drop down box using vb. how is it
possible to list using vb all validations drop downs that appear on a sheet?

Cheers
 
Hi
To count ALL validation cells:
MsgBox
Worksheets("Feuil2").Cells.SpecialCells(xlCellTypeAllValidation).Count
BUT if you have different Validation types it will include all of them.

HTH
Cordially
Pascal
 
have a look at vba help for SpecialCells method
it has 2 modes to either select "AllValidation"
or "SameValidation"

and automates what you could manually do via
Goto Special



keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
Please watch for unwanted carriage return:
MsgBox _
Worksheets("Feuil2").Cells.SpecialCells(xlCellTypeAllValidation).Count

Cordially
Pascal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top