LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Checking if Validation exists in the cell

I want to do some formatting for the cells with Validation.
For example in the enclosed code I begin to check cells from B9 down -
if Validation exists (I have Dropdown lists there), then I change interior
color.
But my method fails (generates error in the first cell without Validation)
and is not general.
Could you give me a hint?
Leszek

Sub change_cells_with_validation()
Dim for_change As Range
Set for_change = Range("B9")
'How to change following line to check if any Validation exists?
Do While for_change.Validation.InCellDropdown = True
for_change.Interior.ColorIndex = 35
Set for_change = for_change.Offset(1, 0)
Loop
End Sub


 
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
Checking if Sheet Exists? [email protected] Excel Discussion (Misc queries) 5 September 1st 06 03:27 PM
checking if an url exists Aldo[_2_] Excel Programming 2 October 9th 05 10:20 PM
Checking if a worksheet already exists... JR[_5_] Excel Programming 1 July 14th 04 09:31 PM
Checking to see if Folder exists Dan[_25_] Excel Programming 2 September 24th 03 02:42 AM
Checking 2 c if workbook exists DavidMc Excel Programming 4 September 5th 03 07:34 PM


All times are GMT +1. The time now is 06:41 AM.

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"