Setting up a Macro

N

Nabeel

Hi,

My problem is as follows:

I need to take out MISs on daily basis for client. I export data from Access
to an Excell file. Then I need to do some tunings like Subtotals, adjusting
column widths, marking some rows bold and finally changing the fonts.

How can I achieve this thru macros? Any support will be well appreciated.
Thanks
 
B

bpeltzer

Here's a general outline of the approach I take to similar goals:
1) Create an Auto_Open macro in Excel and invoke the Excel file as a Windows
Scheduled Task.
2) That macro has a list of 'temp' files to delete.
3) It then invokes Access, opening a database and running an Access macro,
which uses a series of 'Output To' statements to create my raw Excel data
files; the Access macro ends with Quit to shut down Access. (Step 2 was to
avoid a bunch of warnings from Access about overwriting existing files).
4) Back in my Excel macro, I know I've got all my data files, so I open them
up, format, print, email, etc.
5) Be sure not to email anything til, say 7:45am. When your emails go out
at 4am, they know you're up to something ;-)
(You could certainly replace the Access piece with ODBC, but I find I'm able
to do more complex queries, more easily, w/in Access).
My two cents. --Bruce
 
Top