Unfortunatly VBa doesn't recognise dynamic names outwith the sheet it is written for
i.e. Unlike Excel, it cannot recognise where a named range is within a workbook.
We have to tell VBa what sheet it is in
Change the worksheet module code to this (Sheet "Selection")
Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range, rngUniqueList As Range
Dim arrList As Variant
Dim strList As String
Dim LastRow As Long
Dim i As Integer
Set rngUniqueList = Sheets("System List").Range("Unique_List")
LastRow = rngUniqueList.Rows.Count + 1
Set isect = Application.Intersect(Target, Range("C2:C" & LastRow))
If isect Is Nothing Then
Set isect = Nothing
Exit Sub
End If
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
On Error GoTo ResetApplication
arrList = rngUniqueList
' Resize Dropdown List
For i = LBound(arrList) To UBound(arrList)
If Not FindInDDList("C2:C" & LastRow, CStr(arrList(i, 1))) Then
If i = LBound(arrList) Then
strList = CStr(arrList(i, 1))
Else
strList = strList & "," & CStr(arrList(i, 1))
End If
End If
Next
'Apply Validation List to blank cells in range
For i = 2 To LastRow
If Range("C" & i) = "" Then
ReplaceDDList Range("C" & i).Address, strList
Else
ReplaceDDList Range("C" & i).Address, Range("C" & i).Value
End If
Next
ResetApplication:
Target.Select
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
End Sub
Bookmarks