Help with excel!

  • Thread starter Thread starter Pat Lenahan
  • Start date Start date
P

Pat Lenahan

This one line errors out.
lastrow = nfrcws.Range("A65536").End(excel.XlDirection.xlUp).Row + 1

vb.net gives this error below. Im using vb.net with excel 2000


An unhandled exception of type 'System.MissingMemberException' occurred in
microsoft.visualbasic.dll

Additional information: Public member 'XlDirection' on type
'ApplicationClass' not found.
 
Pat said:
This one line errors out.
lastrow = nfrcws.Range("A65536").End(excel.XlDirection.xlUp).Row + 1

vb.net gives this error below. Im using vb.net with excel 2000

An unhandled exception of type 'System.MissingMemberException' occurred in
microsoft.visualbasic.dll

Additional information: Public member 'XlDirection' on type
'ApplicationClass' not found.

I don't speak VB.Net but it looks like it may be a bug in the .Net object
model. You could try substituting the appropriate constant value

lastrow = nfrcws.Range("A65536").End(-4162).Row + 1

and adding a comment to indicate that you mean xlUp.


Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup
 
Back
Top