Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default How to know if a validation dropdown exist

This workbook has many sheets, and some of them have multiple
validation dropdown.

How do I know
1. If a sheet has dropdown(s)?
2. What are their addresses?

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default How to know if a validation dropdown exist

For Each cell In Activesheet.UsedRange
If HasValidation(cell) Then
MsgBox cell.Address
End If
Next cell

'-----------------------------------------------------------------
Public Function HasValidation(r As Range) As Boolean
'-----------------------------------------------------------------
Dim i
Dim ma As Range
On Error Resume Next
HasValidation = True
i = r.Validation.Type
If Err.Number < 0 Then
HasValidation = False
Exit Function
End If
Set ma = r.MergeArea
If ma.Cells(1, 1).Address < r.Address Then
HasValidation = False
End If
End Function

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Who I Am" wrote in message
oups.com...
This workbook has many sheets, and some of them have multiple
validation dropdown.

How do I know
1. If a sheet has dropdown(s)?
2. What are their addresses?

Thanks in advance.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
lost the drop down list (the validation still exist) NirOrtal Excel Discussion (Misc queries) 4 October 17th 08 03:53 AM
Validation-dropdown Wanna Learn Excel Discussion (Misc queries) 1 March 29th 07 07:06 PM
Multiselect Validation (dropdown) Multiselect in cell validations Excel Discussion (Misc queries) 1 December 22nd 06 07:36 AM
dropdown with validation?? luke013 Excel Worksheet Functions 0 August 31st 05 12:46 PM
Pivot tables, Validation Lists exist in an excel file Shimmy Excel Programming 1 June 16th 04 01:45 AM


All times are GMT +1. The time now is 12:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"