[AccessD] Exporting an OLE Object

Hale, Jim Jim.Hale at FleetPride.com
Fri Sep 7 11:59:27 CDT 2007


How about turning it around and using the Excel workbook as the
interface? I have workbooks that update data from Excel input forms, run
queries in Access, download data from the AS400 into Access and download
the required result sets back into the Excel workbook. The advantage of
this configuration is that the user doesn't need to know about Access at
all since everything is initiated from Excel. 

BTW what is wrong with using templates? If your worry is having to mess
with the default template folder you can store the template in a hidden
folder or the same folder as the mda for that matter and use it as
needed. Users don't have to know or care about the template's existence.
For that matter you don't have to use a template- any Excel workbook can
be opened and manipulated from within Access. Since the end result is a
populated Excel workbook I see no inherent advantage in using an ole
object as opposed to a template or existing workbook. 

Also, does the code need to reside in the Excel workbook? Anything that
can be run from inside Excel can be run from within Access eliminating
the need for separate code in Excel. I will admit I have seen a couple
of cases where it worked best to run separate code in Excel after the
book had been created but generally this is not necessary.

Anyway, just some general thoughts. 
HTH
Regards,

Jim Hale

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
ewaldt at gdls.com
Sent: Friday, September 07, 2007 7:53 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Exporting an OLE Object

I have an Excel workbook with some complicated code; I need to export
data 
to the workbook and run the code. I know how to do that, but this
database 
will be used by several people, and I'd prefer not to have to require
them 
to use an Excel template. I have imported a workbook (blank except for a

module containing the needed code) as an OLE object in its own table in
my 
database. I want to export (or open-and-save-as) the workbook, add the 
appropriate data from Access, and then run the code (in whatever order
is 
best).

How do you export an Excel workbook as an OLE object via VBA? Of course,

if you have better ideas...

TIA.

Thomas F. Ewald
Stryker Mass Properties
General Dynamics Land Systems



***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.




More information about the AccessD mailing list