Excel save as CSV VBA -
i need save copy of worksheet i'm using csv file. save name date , users name, i've set variables information keep getting run-time error '1004'; application-defined or object-defined error message , not work.
code i'm using is:
sub savecsv() rundate = datetime.now runname = application.username savename = rundate & runname sfilename = activeworkbook.path & "\" & savename & ".csv" activeworkbook.save activeworkbook.saveas filename:=sfilename, fileformat:=xlcsv application.displayalerts = true end sub
can point me in right direction problem , how fix please?
Comments
Post a Comment