The Code Below Performs as intended, but it locks up when parameters identified in the .find command do not exist.
How may I Exit Do if the Set c = .FindNext(c) is not found? [vba]
With Sheets("sheet2").Range("a:a")
Dim r As Range
Set r = .Find(Sheets("sheet1").ComboBox1, lookat:=xlWhole)
If r.Offset(0, 5) = "" Then
r.Offset(0, 5) = Date
r.Offset(0, 6) = Sheets("sheet1").ComboBox4
r.Offset(0, 7).FormulaR1C1 = "=sum(rc[-2]-rc[-6])"
Else
Set c = .Find(Sheets("sheet1").ComboBox1, lookat:=xlWhole)
If Not c.Offset(0, 5) Is Nothing Then
Do
Set c = .FindNext(c)
If c.Offset(0, 5) Is Nothing Then
Exit Do
End If
Loop Until c.Offset(0, 5) = ""
End If
c.Offset(0, 5) = Date
c.Offset(0, 6) = Sheets("sheet1").ComboBox4
c.Offset(0, 7).FormulaR1C1 = "=sum(rc[-2]-rc[-6])"
End If
End With
[/vba]