This piece of script is within a more elaborate one is also withing a DO .... LOOP.
Basically if my sheet is defined as 60 days I want to loop through column C if not 60 days, loop through column B. fairly simple I thought.
I have tried so many things but nothing works. I get error messages: DO WITHOUT LOOP, LOOP WITHOUT DO, etc. one after the other.
What wrong with this code ?
If DaysAged = 60 Then
Do Until Range("c" + CStr(i)) = "" 'Do until record is empty
CurrentVendorNo = Range("c" + CStr(i)).Value 'Compare both records
NextVendorNo = Range("c" + CStr(i + 1)).Value
Else
Do Until Range("B" + CStr(i)) = "" 'Do until record is empty
CurrentVendorNo = Range("B" + CStr(i)).Value 'Compare both records
NextVendorNo = Range("B" + CStr(i + 1)).Value
End If
Thanks for your suggestions.
Mike
Basically if my sheet is defined as 60 days I want to loop through column C if not 60 days, loop through column B. fairly simple I thought.
I have tried so many things but nothing works. I get error messages: DO WITHOUT LOOP, LOOP WITHOUT DO, etc. one after the other.
What wrong with this code ?
If DaysAged = 60 Then
Do Until Range("c" + CStr(i)) = "" 'Do until record is empty
CurrentVendorNo = Range("c" + CStr(i)).Value 'Compare both records
NextVendorNo = Range("c" + CStr(i + 1)).Value
Else
Do Until Range("B" + CStr(i)) = "" 'Do until record is empty
CurrentVendorNo = Range("B" + CStr(i)).Value 'Compare both records
NextVendorNo = Range("B" + CStr(i + 1)).Value
End If
Thanks for your suggestions.
Mike