Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,570
- Office Version
- 365
- 2016
- Platform
- Windows
I have this code that is supposed to apply a named range to a cell validation list.
The named ranges are defined properly as I can see them in the name manger.
In runtime, the cell dropdown list simple say #N/A.
Is anyone able to suggest what might be causing this?
Code:
Range("M2").Validation.Delete
If wloc = "W" Then 'waterloo park
Range("M2").Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Formula1:=nr_labour_wp
Else 'service centre
Range("M2").Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Formula1:=nr_labour_sc
End If
The named ranges are defined properly as I can see them in the name manger.
In runtime, the cell dropdown list simple say #N/A.
Is anyone able to suggest what might be causing this?