+ Reply to Thread
Results 1 to 11 of 11

Saving CSV file and sending to a folder over and over again

  1. #1
    Registered User
    Join Date
    12-12-2003
    Posts
    79

    Saving CSV file and sending to a folder over and over again

    Thanks for any help in advance

    I have this code

    Please Login or Register  to view this content.
    so when i run this macro it saves the sheet caleed CSV as CSV file as a name from another sheet which changes all the time,, this works ok

    however my problem is this only works once because when i run the macro again it cant find the Sheet called CSV anymore because it has renamed it from the previous running of the macro

    so i need to be able to run the macro whenever i want over and over again

    also it would be good not only could i save it by running the macro via a form button but also say it saves itself every 10 seconds, that would be a bonus

    hope ive explained it well


    thanks
    scott
    Last edited by scottymelloty; 01-14-2009 at 08:57 AM.

  2. #2
    Registered User
    Join Date
    12-12-2003
    Posts
    79
    If anybody has another way of doing it that would be good as well

    i need the CSV sheet saving as a csv file to the path and name set in cell 'MATCH SETUP'!B34 , this cell name will change ie it will put the time it is saved in the name

    so i need to save that file on demand when running the macro and hopefully say every 10 seconds as well (but that bit could wait)


    maybe it could open a blank workwook, paste the data from CSV sheet onto the new workbook then save and send that new work book as a csv file to the path ,, maybe thats even more complicated !!

    any ideas the less complicated the better would be good


    thanks very much

    scott

  3. #3
    Registered User
    Join Date
    12-12-2003
    Posts
    79
    I Have attached a file to show what i mean if it helps

    you will have to change the path name on the MATCH SETUP tab in cell B32 so it can save somewhere on your own computer to test

    so on the Calculator Sheet when you press that button it will save the datat on CSV sheet as a CSV file to the path specified which is what i want

    however when you rpess the button again it dosnt like it because the sheet CSV dosnt exist anymore because it has been overwritten with a new name from the csv file last saved
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-12-2003
    Posts
    79
    any ideas anyone ? could do with some help or a pointer in the right direction please

  5. #5
    Registered User
    Join Date
    12-12-2003
    Posts
    79
    help

    any code to change a worksheet name back to original name would help

    thanks

  6. #6
    Registered User
    Join Date
    12-12-2003
    Posts
    79
    ok ive taken itrom a differnet angle using some code ive found and changed a bit this works nicely wiht one exception,, it creates a copy of all the worksheets in my workbook

    i woul dlike it to just copy one of the worksheets in my workbook , in this case the worksheet called CSV

    What do i need to change ?

    Please Login or Register  to view this content.
    thanks

  7. #7
    Registered User
    Join Date
    12-12-2003
    Posts
    79
    ok, i think i am talking to myself lol but i have solved that last problem and it now save the one worksheet i want it to ,

    however after the active.window.close command at the end of my code it is asking me if i want to save the changes which i do but i just want it to automatically save rathe rthan ask me,

    any idea ??????/

    latest code

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    12-12-2003
    Posts
    79
    it's ok ive figured that bit out now

    im slowly but surely getting there,, it now saves the one worksheet i want saving as a csv file to a path and name i want

    the next thing is to do this automatically every 10 seconds , no idea how to do that , but will keep persevering

    as always any help will be great

  9. #9
    Registered User
    Join Date
    12-12-2003
    Posts
    79
    ok, what might be more manageable rather than use a time refresh to save the sheet is to save the sheet when my target cell changes , it seems to involve the Worksheet _change function but im unsure how to incoprate it into the code i already have

    i want it to trigger this code when cell B34 changes

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    12-12-2003
    Posts
    79
    ok,, ive got something to work in a fashion

    putting some code into a worksheet private sub function fires the macro i want howveer it only calls the macro if i physical type something into the cell, i just want it to call the macro if the data in the cell changes without me typing anything in,, any ideas please ?

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    12-12-2003
    Posts
    79
    i think i have worked it all out myself now from looking around websites etc and eperimenting so i will close thread as solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1