TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 271
- Office Version
- 365
- Platform
- Windows
Hello,
I have the following (probably very inefficient bit of code) which is failing with "Object Required". Can anyone tell me what I'm doing wrong and perhaps suggest a better way rather than using a FOR-NEXT loop on 32,000 records?
b is dimmed as a String.
If I take the right out and just use
it runs fine (albeit slowly)
Many thanks as always.
I have the following (probably very inefficient bit of code) which is failing with "Object Required". Can anyone tell me what I'm doing wrong and perhaps suggest a better way rather than using a FOR-NEXT loop on 32,000 records?
Code:
lrow = wb1.Sheets("Go Card").Cells(wb1.Sheets("Go Card").Rows.Count, "B").End(xlUp).Row
For a = 2 To lrow
b = Right(wb1.Sheets("Go Card").Range("AE" & a), 13).Value
Range("A" & a).Value = b
Next
b is dimmed as a String.
If I take the right out and just use
Code:
b = wb1.Sheets("Go Card").Range("AE" & a).Value
it runs fine (albeit slowly)
Many thanks as always.