469,637 Members | 1,572 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,637 developers. It's quick & easy.

Format Excel worksheet from inside Access 2003 application

Hi everyone,

Looking for some help or ideas, on the folloiwng problem.

Have an Access 2003 application that creates an Excel file containing
data from an Access parameter query. This is accomplished with the
following line:

DoCmd.TransferSpreadsheet acExport, , "MyQuery", "ExcelFileName", True

That's the easy part. The problem is, the audience this Excel file is
intended for requires the workbook created by the above line to not
only contain the proper data (provided by the query), but also, for
the worksheet containing that data to be formatted in a specific way.

I would like to be able to write some VBA code to format the worksheet
to the required specs. The actual code that does the formatting can be
easily created by recording the steps of a macro in Excel while I
format the sheet as desired. Now, I would like to be able to run that
code from inside Access, right after the above line
(DoCmd.TransferSpreadsheet acExport....) runs.

1) Ideally, I would like Access itself, via the VBA code, to
manipulate (format) the Excel sheet just created, so this could happen
in any computer, whether Excel is installed in it or not. Is this
possible? How?

2) If that is not possible, and Excel NEEDS to be launched from the
Access VBA code to achieve this, can it be done in a completely silent
mode, so the Access application user is not aware that Excel launched,
formatted a sheet and closed? If that is the only manner to achieve my
goal, how can this be accomplished?
Nov 11 '08 #1
1 3524
"Joe Humburg" <Jo*@humburg.netwrote in message
news:tg********************************@4ax.com...
Can't thank you enough for your extremely fast and detailed response,
Keith. Will give it a try right away.

Thanks !!!!!!!
No problem, hope it helps.

Keith.
www.keithwilby.co.uk

Nov 12 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by James Wong | last post: by
8 posts views Thread by Sam | last post: by
9 posts views Thread by Doug Glancy | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.