Sub Macro1()
Dim wPath As String, wFile As String
Application.DisplayAlerts = False
Application.ScreenUpdating = False
wPath = "H:\SAP JEs\"
wFile = ActiveSheet.Name & ".csv"
ActiveSheet.Copy
ActiveWorkbook.SaveAs Filename:=wPath & wFile, FileFormat:=xlCSV, CreateBackup:=False
ActiveWorkbook.Close False
End Sub
I don't understand the question, can you explain?do you know why it would be erroring out if I just deleted some of the data or changed some of it? I would think that the file would still save as a CSV file
I don't understand the question, can you explain?
It may be that he had a reserved word or some symbol that is not allowed. Or the file was open.it was having the debugger come up. I changed the tab name and it worked so perhaps it had a name that it didn't like? I thought it was maybe because a version of that CSV was already saved out there but it still did it after I deleted the file. when I clicked on debug the bold line above was highlighted
It may be that he had a reserved word or some symbol that is not allowed. Or the file was open.
What did the error say?
What did you have of name on the sheet?