ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to list all validation cells on a sheet (https://www.excelbanter.com/excel-programming/313535-how-list-all-validation-cells-sheet.html)

HCS

how to list all validation cells on a sheet
 
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



papou[_11_]

how to list all validation cells on a sheet
 
Hi
To count ALL validation cells:
MsgBox
Worksheets("Feuil2").Cells.SpecialCells(xlCellType AllValidation).Count
BUT if you have different Validation types it will include all of them.

HTH
Cordially
Pascal

"HCS" a écrit dans le message de
...
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





keepITcool

how to list all validation cells on a sheet
 

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


"HCS" wrote:

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





papou[_11_]

how to list all validation cells on a sheet
 
Please watch for unwanted carriage return:
MsgBox _
Worksheets("Feuil2").Cells.SpecialCells(xlCellType AllValidation).Count

Cordially
Pascal

"papou" a écrit dans le message de
...
Hi
To count ALL validation cells:
MsgBox
Worksheets("Feuil2").Cells.SpecialCells(xlCellType AllValidation).Count
BUT if you have different Validation types it will include all of them.

HTH
Cordially
Pascal

"HCS" a écrit dans le message de
...
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







HCS

how to list all validation cells on a sheet
 
Thanks to both of you that looks like what i need!

Cheers

"keepITcool" wrote in message
...

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


"HCS" wrote:

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








All times are GMT +1. The time now is 01:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com