LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Start Excel and run a macro on a given filename?

Hi all

I was hoping there were some command line switches that would allow this
functionality but I can't find them.

I've found instructions on automatically running a macro within an existing
workbook by calling it Auto_Open but that doesn't quite match what I need.

What we have is a batch script that runs every Monday and produces a .csv
file called IS_ScanResults_yyyymmdd_hh.mm.csv. As you can see the filename
changes every time the script runs (such as
IS_ScanResults_20041130_11.28.csv if the script ran today at 11:28 am).

I've also written a VB macro that tidies up the raw .csv file in to a more
presentable Excel spreadsheet, converting bytes to megabytes and sorting by
one of the columns etc. etc.

What I'd like to do is at the end of the batch file get it to open the .csv
file in Excel and run the macro (called 'FormatMailServerCapacityReport' and
stored in macros.xls) on that .csv file.

Is there a way of achieving this?

Thanks in advance

JJ (UK)


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel macro to prompt for filename [email protected] Excel Discussion (Misc queries) 8 January 4th 07 01:31 AM
Help? start macro automatic in excel pim_parra Excel Worksheet Functions 2 April 8th 05 02:03 PM
How to save a vary filename by Macro in Excel? mc Excel Programming 1 October 15th 04 01:34 PM
Excel auto-start macro RDCLARK Excel Programming 3 October 5th 04 07:21 PM
Macro to Create PDF from excel with filename... Steve Hillin Excel Programming 3 December 12th 03 05:44 PM


All times are GMT +1. The time now is 03:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"