EXCEL - try to find last row on column A

AlbertLex

New member
Joined
Jul 23, 2014
Messages
1
Programming Experience
1-3
Hi,

just an introduction, i write heaps of VBA for excel and currently self-trained Visual Basic.

i am currently writing a code to find the last row used. see below

VB.NET:
with oXLSheet  'current active sheet
    A1 = .Cells(.Rows.Count,1).end(xldirection.xlup).row
end with

It gives me error "NullReferenceException was unhandled"

Can someone point me in the right direction?

much appreciated.

regards,
Lex
 
Back
Top