View Single Post
 
Old 01-24-2025, 07:26 AM
batman1 batman1 is offline Windows 11 Office 2013
Advanced Beginner
 
Join Date: Jan 2025
Posts: 57
batman1 is on a distinguished road
Default

I would change it to (don't use On Error... ONLY to exit Do... Loop)
Code:
If Not oRng Is Nothing Then
    FirstAdd = oRng.Address
    Do
        oCol.Add oRng.Row, CStr(oRng.Row)
        Set oRng = .FindNext(oRng)
    Loop While oRng.Address <> FirstAdd
End If
Reply With Quote