seriouslystuck
Board Regular
- Joined
- Sep 24, 2009
- Messages
- 97
Hi
Can someone please help me! Im getting the error object variable or with block variable not set, at the red txt
Dim searchdate As String Dim c As Range Dim firstaddress As String Dim blnRepeat As Boolean
blnRepeat = True
Do While blnRepeat = True
searchdate = Range("FH5").Value
With Range("F:F") Set c = .Find(searchdate, LookIn:=xlValues) If Not c Is Nothing Then firstaddress = c.Address blnFndMtch = True Do c.Offset(0, 0).Value = Range("FI5").Value blnRepeat = False Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> firstaddress End If End With
If c Is Nothing Then
Exit Do
End If
Loop
End Sub
Can someone please help me! Im getting the error object variable or with block variable not set, at the red txt
Dim searchdate As String Dim c As Range Dim firstaddress As String Dim blnRepeat As Boolean
blnRepeat = True
Do While blnRepeat = True
searchdate = Range("FH5").Value
With Range("F:F") Set c = .Find(searchdate, LookIn:=xlValues) If Not c Is Nothing Then firstaddress = c.Address blnFndMtch = True Do c.Offset(0, 0).Value = Range("FI5").Value blnRepeat = False Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> firstaddress End If End With
If c Is Nothing Then
Exit Do
End If
Loop
End Sub