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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -