LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How do I check if a cell has a dropdown

Hi Peter T,

Thanks for the code, it worked great.

Appreciate the help





"Peter T" wrote:

Sub test()
Dim nValType As Long
Dim rng As Range, cel As Range

Set rng = Selection

On Error Resume Next
For Each cel In rng
nValType = 0
nValType = cel.Validation.Type ' error if not validation

If nValType = 0 Then
' no validation
ElseIf nValType = xlValidateList Then
' dropdown list
Else
' some other validation
End If
Next

End Sub

Regards,
Peter T
"Givnik" wrote in message
...
I am validating a spreadsheet checking a range of cells and need to

validate
that all the cells in the range has a dropdown associated with it. Any

ideas
what the code is to do this.....




 
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
check or uncheck a check box based on a cell value RTKCPA Excel Discussion (Misc queries) 1 February 3rd 10 03:11 PM
Copy and move check box (check boxes) with new cell link? Marty Excel Worksheet Functions 1 January 20th 10 07:43 PM
Check if Conditional Format is True or False / Check cell Color Kevin McCartney Excel Worksheet Functions 5 June 29th 07 11:12 AM
DROPDOWN LIST AND CHECK BOX FC Excel Discussion (Misc queries) 1 March 29th 07 03:45 AM
Conditional Format with VBA - Interior Colour of cell based on value from in-cell dropdown Steve[_52_] Excel Programming 5 June 15th 04 11:45 AM


All times are GMT +1. The time now is 11:17 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"