Excel 15 for mac
Im trying to run an edit on a file and save the file as a CSV. I once was able to run the code but now I receive "Runtime error 1004: cannot access 'filename'"
Neither the files nor the directories have changed so I'm not sure how to debug this. Where is my issue?
Sub Macro5_eggplant()
'
' Macro4_eggplant Macro
' prep and save as
'
'
Dim newname As
String
With ActiveSheet
newname = Left(.Parent.Name, InStrRev(.Parent.Name, ".") - 1)
.Rows(1).Delete Shift:=xlUp
.Columns("C:E").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
.Range("C2").FormulaR1C1 = "replace"
' or = .Parent.Name ?
.Range("C2").AutoFill Destination:=.Range("Table4[Column1]")
.Parent.SaveAs Filename:=("/Users/matthewhughes/desktop/txtlogsheets/") & newname & ".csv", _
FileFormat:=xlCSV, _
CreateBackup:=False
End With
End Sub
***Post moved by the moderator to the appropriate forum category***