Macro won't stop creating zipped files

  • I have a code that creates a zipped file that saves to the desktop. The macro works fine except it repeats itself and doesn't stop. How can I change the following code so that it only creates one zipped file?



  • Re: Macro won't stop creating zipped files


    Without seeing the workbook you have a loop

    Code
    For I = 2 To RowCount + 1


    Depending on the length of Column C you have the code for creating the zip file in a loop - that is why you ar getting multiple zip files created - the code for creating the zip files is within a loop - any reason for that? Why put directory into array FName then test if it is an array? Have you cut and pasted this code from somewhere? You loop variable is I then you reset the value of loop variable and then change its value which is really poor programming practice. To tell you the truth it is not the greatest bit of code.

    Regards
    [SIZE=3]Anthony
    [/SIZE]&WCF_AMPERSAND[SIZE=3]
    [/SIZE]&WCF_AMPERSAND&WCF_AMPERSAND&WCF_AMPERSAND[SIZE=2]You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.[/SIZE]




Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!