Hello all,

Here's my scenario. I have an Access app that needs to grab data from
an Excel worksheet. What I've done is create a function in Access
that simply calls excel.run(myproc(arg1, arg2)).

The excel proc needs to return a bunch of numbers so I pass ByRef. I
can't think of a cleaner way of doing this without updating the db in
excel itself.

My question:

In Access, when I declare my excel object as an object, the byref
works, but if I declare it as Excel.Application then it doesn't work.
Why?

In both tests, I use set xlsApp = new excel.application, the only
difference is in the actualy dim statement.

Am I missing something here, cause I'd really like to bind early, it's
just cleaner.

Thx,
Bodi

ByRef question by Stephanie

Stephanie
Thu Aug 26 15:21:02 CDT 2004

Hi, Bodi,

Did you try posting this request in the Access
programming newsgroup? This newsgroup is specific to
Word, so you might have a better chance of help there.

Stephanie


>-----Original Message-----
>Hello all,
>
>Here's my scenario. I have an Access app that needs to
grab data from
>an Excel worksheet. What I've done is create a function
in Access
>that simply calls excel.run(myproc(arg1, arg2)).
>
>The excel proc needs to return a bunch of numbers so I
pass ByRef. I
>can't think of a cleaner way of doing this without
updating the db in
>excel itself.
>
>My question:
>
>In Access, when I declare my excel object as an object,
the byref
>works, but if I declare it as Excel.Application then it
doesn't work.
>Why?
>
>In both tests, I use set xlsApp = new excel.application,
the only
>difference is in the actualy dim statement.
>
>Am I missing something here, cause I'd really like to
bind early, it's
>just cleaner.
>
>Thx,
>Bodi
>.
>