excel - How to generate a CSV for a given range on a click of form button? -
i generating csv using form button. button click code looks this:
with activesheet lfnum = freefile sfname = mypath & myfilename open sfname output lfnum each rrow in range(range("a1"), range("h1").end(xldown)).rows each rcell in rrow.cells soutput = soutput & cstr(rcell.value) & sdelim = + 1 next rcell soutput = left(soutput, len(soutput) - len(sdelim)) print #lfnum, soutput soutput = "" next rrow close lfnum
this code takes sometime generate csv file 1 million records in columns a:h.
how can make faster? , how exit form once complete?
Comments
Post a Comment