Late Binding Excel in Access

M

matthew.buis

I have a project I'm working on and am trying to convert it to late
binding to allow compatibility with earlier versions of Excel/Access.

I've got my declarations and objects set up properly, but some of my
statements within my code are causing problems.

..Range("D4", .Range("D65365").End(xlUp).Address).NumberFormat = "0" is
one of them. Any idea why it would bug out, causing a 'Object Defined
or Application Defined' error?
 
G

Guest

xlup is probably undefined - with a default value of zero which probably
isn't a legitimate argument to End.

use the numeric equivalent:

? xlup
-4162


this will be true for all your excel constants if your automating Excel from
Access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top