Urgent!!! -- Reference libraries

M

Michelle

Hello,

I have developed a set of code in Excel 2002 to
manipulate some excel raw data into a report structured
spreadsheet. This excel uses the excel reference library
v. 10.0. However, when I tried to run the same macro in
Excel 2000 machines, it does not recognize some of the
function calls. This I believe is due to it referencing
a v. 9.0 reference library. Is there anyway to point it
to the 10.0 reference library without updgrading the 2000
machine or downgrading the code to be restructured for
2000 format? The code is extremely lenghty, so any help
on this is much appreciated!

Thanks in advance,

Michelle
 
D

Dave Peterson

Instead of having a reference to the library (called early binding), you could
use late binding.

You define your variables as generic objects and then when xl2k runs, it'll use
it's version.

But if you're creating excel objects/applications, you might not need it at
all. Just use the instance of excel that's running.

If that makes no sense at all, you may want to post a snippet of code--not the
workbook.
 
M

Michelle To

Hi Dave,

What you have mentioned does make sense, and I have done that before.
However, for example, I have used a Paste Special command for only
pasting values and number formats in XP. (PasteSpecial
Paste:=xlValuesAndNumberFormats) But the problem is, this command does
not exist at all in 2000, as a result it throws an error. So I have put
in (PasteSpecial Paste:=xlValues , PasteSpecial Paste:=xlFormats) as two
separate commands in the code. By doing so, now I have to go in and
re-format everything. Because this is a long set of code, I was just
wondering whether there was an easy way out of just importing a
reference library or somehow be able to use more than one excel
reference library.

If you have any suggestions for this, I would much appreciate it.

Thanks,

Michelle
 
D

Dave Peterson

The paste:=xlvaluesandnumberformats will cause a problem with late binding or
early binding--'cause (like you said), it doesn't exist in xl2k.

I don't think that there's a way to steal from one version to the previous.
(maybe just upgrading those stragglers!??)
 

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