If the text is not found then the object FoundOne will be nothing so you need to test for that first.
Dim DXFDict, fAddress As String, LookInR As Range
Dim DXFDescription, DXFCode, Key, FoundOne As Range
Set DXFDict = CreateObject("Scripting.Dictionary")
DXFDict.Add "ROAD", "10"
DXFDict.Add "TREE", "24"
DXFDict.Add "FENCE", "30"
DXFDict.Add "GATE", "31"
'DXFDict.Add "", "0"
Set LookInR = Sheets("Orienteering").Range("E:E").CurrentRegion
For Each Key In DXFDict
With LookInR 'Columns("E")
Set FoundOne = .Find(What:=Key, LookAt:=xlPart)
If Not FoundOne Is Nothing Then
fAddress = FoundOne.Address 'ERROR ON THIS LINE
Do
FoundOne.Offset(1).Value = DXFDict.Item(Key)
Set FoundOne = .FindNext(After:=FoundOne)
Loop While FoundOne.Address <> fAddress
End If
End With
Next
Bookmarks