Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
With VBA, I am failing at trying to assign a named range as the criteria for a list conditional formatting.
Here is my code where I prepare the cell's conditional formatting:
The line in red is giving me an "Application defined or object defined error". (I took this code from macro recorder)
eno_list is what I think is a named range. (It does appear valid in the names list)
Here is my code where I prepare the cell's conditional formatting:
Rich (BB code):
With ws_staffrec
.Unprotect
With .Range("B6")
.Value = ""
.Interior.Color = RGB(218, 238, 243)
Call build_emplnolist
With .Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=eno_list
.IgnoreBlank = True
.InCellDropdown = True
.ShowInput = True
.ShowError = True
End With
End With
...
End With
The line in red is giving me an "Application defined or object defined error". (I took this code from macro recorder)
eno_list is what I think is a named range. (It does appear valid in the names list)