Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm trying to gin up the code to determine if a cell in a worksheet
validates data from a list and if yes, what list is in use. What I have so far is: sub Find_Val() dim rCell as range For Each rCell In ActiveSheet.UsedRange If rCell.Validation.Type = xlValidateList Then MsgBox rCell.Validation.Formula1 Next rCell end sub This generates an error. Can anyone suggest valide code to do this? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Futzed with it some more, and this code will do it:
Sub Find_Validation() Dim rCell As Range On Error Resume Next For Each rCell In ActiveSheet.UsedRange If rCell.Validation.Type = xlValidateList _ Then MsgBox rCell.Validation.Formula1 Next rCell End Sub .... but is there a more direct or "elegant" way? The On Error Resume Next seems like a cheap fix. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Validation Data using Validation Table cell range..... | Excel Discussion (Misc queries) | |||
Why does data validation not work when pasting data into a cell. | Excel Discussion (Misc queries) | |||
Excel: Find/Replace for Data Validation text or Worksheet Objects | Excel Discussion (Misc queries) | |||
Data Validation / find & replace | Excel Discussion (Misc queries) | |||
Find the cell value in excel by using vb code | Excel Discussion (Misc queries) |