Consulting

Results 1 to 4 of 4

Thread: VBA script to monitor folder and change file to csv

  1. #1

    VBA script to monitor folder and change file to csv

    Dear VBA,


    I need help with my coding, I need to create VBA script which will monitor one folder and convert excel sheet that is exel file (ID, Status, Name, Surname) to csv file (ID, Status) and move it to a new folder and delete excel from input folder. Thank You very much.


    Best regards.
    D

  2. #2
    You should always create a new post instead of reviving an old one. Especially given this is different from the original question.

    In my opinion, this is something that VBA isn't suited for. You really don't want a Microsoft Office app running all the time to just monitor a folder. Using VB6 or VB.Net w/Winform or better just a Windows service would be better.

    Perhaps Monitor Folder for changes-VBForums

  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,089
    Location
    Welcome to VBAX Domagoj2133. As suggested by jdelano, this thread of yours should be an independent thread, so I've corrected this for you.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,089
    Location
    If I understand your post, you would like to;
    a) Monitor a particular folder, for any excel files, (these workbooks contain 4 columns of data - ID, Status, Name & Surname, then
    b) Open each workbook, copy two columns namely ID & Status, save the copied range to a new file in different folder as a csv format, then
    c) Delete the original excel file.

    Is this correct?

    A couple of quick questions. Do you know, for example;
    The path and file name of the folder that currently holds the excel files, and the path of the intended folder that you wish to save the new files into?
    Is there any way to define which excel workbooks, which actual sheet contains the actual data, and which actual columns contain the data?

    Have you tried to do this process using the macro recorder?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •