View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Command line switches.

You can't run a macro from the command line. You could write a
procedure called Auto_Open that will be executed when the file is
opened.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Jarryd" wrote in message
...
Hello,

We receive a rather poorly formatted csv file from our courier
company to serve as the digital copy of our monthly bill. I
wanted to import this data into Access 2003 so that it is
easier for users to search and read the data. I have created an
Excel 2003 workbook that is to be used as an interface file for
Access 2003. I have created a macro that pulls the data in to
the spreadsheet, deletes what shouldn't be there, formats the
rest, adds some column headers, and saves it file to a new
file. In Access 2003 I have then written a script that is
triggered by a button to pull the data into a table and do some
other bits. I was wondering if it would be possible to lauch
Excel opening a scpecified file and running a specified macro.
If so, would it be best done in VBA or are there command-line
switches for this? I figured that if the command-line switches
were out there then I could write a quick bacth file that could
be fired from Access 2003 before it imports the data.

Is there a better way to automate Excel?

TIA,

Jarryd