View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Steve Yandl Steve Yandl is offline
external usenet poster
 
Posts: 284
Default Making a Macro that will run a script at the end

It would help to know exactly what you mean by 'a command line script'. My
guess is that you have a vbScript file with a vbs file extension that acts
on your csv file. Is that the case?

If you have such a vbs file, you could probably modify it to open the
workbook, save a copy of sheet2 as a csv file and then do its thing. An
alternate approach would be to create a subroutine in your workbook that
does whatever it is the script does.

You can launch a script from VBA but it would help to know how the script
takes arguments and what type file it is.


Steve Yandl


"satyan" wrote in message
...
I have data in an excel file which I need to convert into a csv file,
save the csv file, and then run a script from the command line with
the csv file's location as a parameter. It can be the same name
everytime, I just don't know how to go about running a command line
script. Any help would be much appreciated!

(For hte CSV file), I've made it so that Sheet2 in the workbook is
just the data with commas in between, such that I could just copy it
into notepad, save it, and it would work as a CSV file for me. If
there's a better way to do it, I'd be glad to try it.

Thanks in advance for your help!