Formatting Excel from Access using xlcommands.

C

Cathy

Subject: Formatting Excel from Access using xlcommands.

1. Can you utilize the xlcommands from within Access?

2. If so, what is the correct syntax for the following
example:

myXL.ActiveSheet.Selection.End(xlDown).Select

where myXL is Dim as object and set to excel file name.

3. I have added the Microsoft Excel 9.0 Object Library to
the references. (Any benefit?)

Cathy
 
C

Cathy

Checked out example but it did not specifically address
the xlcommands normally used in Excel. I can format excel
spreadsheet from Access as long as I do not utilize any of
the xlcommands from the Excel object library (for
example): xldown, xlEdgeTop. Any way to use these?

Cathy
 
D

Douglas J. Steele

You need to set a reference to the appropriate version of Excel (Tools |
References with any code module open). Note that doing this can cause your
application to break if distributed to a user who does not have the exact
same version of Excel as you do.

The other option is to define the values for the constants you're trying to
use.
 
T

TRM

I just wanted to say "thanks" for this! It's helped me to get one step
closer on my project!
 
Top