472,328 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

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 3638
"Joe Humburg" <Jo*@humburg.netwrote in message
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.


Nov 12 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Mr. Smith | last post by:
Hello all, My code can successfully open, write to, format and save several worksheets in a workbook then save it by a given name, close and quit...
by: BerkshireGuy | last post by:
I have the following Access code that exports to Excel, inserts a title, changes the color of the title, and then changes the format of several...
by: Anthony | last post by:
To me, creating Excel 2003 spreadsheets programmatically via VB.NET hasn't really changed since the days of VB6. That is, I'd do something...
by: James Wong | last post by:
Dear all, I have an old VB6 application which can create and access Excel object. The basic definition statements are as follows: Dim...
by: Sam | last post by:
Hi All, I posted this message few days ago. No one has answered so far. I just would like to know if it is possible to do or not. Even if you...
by: dan_roman | last post by:
Hi, I developed a script with a nice interface in Tkinter that allows me to edit some formulas and to generate an Excel worksheet with VBA macros...
by: sherifffruitfly | last post by:
Hi, I'm using an adaptation of excel-reading code that's all over the internet - I don't much like or understand it, but it has worked for me in...
by: Doug Glancy | last post by:
I got the following code from Francesco Balena's site, for disposing of Com objects: Sub SetNothing(Of T)(ByRef obj As T) ' Dispose of the...
by: and1 | last post by:
hello .. hmm currently i'm working on vba in excel, apparently i use ADO to extract a table data from access to excel and it works fine. the problem...
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.