excel vba - Kill macro returns a 53 error -
this macro returns 53 error.
if use csvpath2 variable kill command macro works, if use sprocessfile variable not.
sub delete() dim csvpath string dim csvpath2 string dim sprocessfile string csvpath = "c:\test\" 'csvpath2 = "c:\test\*.csv" sprocessfile = dir(csvpath & "*.csv") kill sprocessfile end sub
you need complete filespec (including path)
on machine:
sub delete() dim csvpath string dim sprocessfile string csvpath = "c:\testfolder\" sprocessfile = dir(csvpath & "*.csv") kill csvpath & sprocessfile end sub
Comments
Post a Comment