spitcha
asked on
Excel .end(xlUp) fails
The sub writes messages in Outlook to an Excel file. I need the script to select to lastRow in the excel file but the line "rInt = xlWks.Range("A65536").End( xlUp).Row" errors.
ol-xl-error.txt
ol-xl-error.txt
dim rInt as a long instead, you probably have more than the 32 some thousands supported by the integer data type.
ASKER
Thanks for the reply. I get the same error after changing rInt to long
See if this will work:
rInt = .Cells(.Rows.Count, "A").End(xlUp).Row
Flyster
rInt = .Cells(.Rows.Count, "A").End(xlUp).Row
Flyster
ASKER
Nope. Still getting the same error.
ASKER
The issue is with end(xlUp). I'm able to select or get any value, leaving this query out.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Adding this line fixed the issue.
Thanks much!
Thanks much!