Sunnyboy Posted March 29, 2010 Report Share Posted March 29, 2010 Hello every one, My macro needs to do 3 things. 1. I need to open an excel CSV file in a folder. 2. I need to change the extention CSV to TXT (tab seperated value in excel). 3. I need to move the new .TXT file to an other location. 4. I need to run an existing macro with this file. Here are my issues with each steps. 1. My macro will be run on a scheduler only week days. However, the CSV files that I need to process are generated in this folder every days. That means when my macro will run on mondays i will have 3 files to process (fri, sat, sun). Here is the format for the files generated in the folder: FILENAME_YYMMDD.CSV In the Launch program command, I can't use the "*" to complete the file name I need to open. I need to write the complete path name and I can't use a variable with this command. So how can I do this? I need to process all 3 files, one after another (the oldest file 1st). 2. Is there a faster, easier and safe way to convert my Excel .CSV file into .TXT (tab separated value) instead of opening the file in Excel and Save as command? 3. I have to move my .TXT file, to an other folder. I guess I use the Move file command and here i can use "*" in the Program Path/Name field. I have no issue with this step. 4. When I run my other macro, with the new TXT file, I am ask for a file name. Can't use the "*" here again. So how would I do that? Should I rename my file to process with something standard such as: FILETOBEPROCESS.TXT and delete it at the end of each process job? Thanks so much for your help. I've been looking over the forum for quite some time now to find topics that matches my needs. Thanks again. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.