Any ideas why the following macro crashes Excel when I run it? If I split it up into two different ones (right at the line that begins with "ChDir"), then it runs fine.
Sub Export()
Application.ScreenUpdating = False
Columns("B:Y").Select
Selection.Copy
Sheets.Add.Name = "Export"
Sheets("Export").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Columns("M:M").Select
Selection.Delete Shift:=xlToLeft
Application.DisplayAlerts = False
ChDir "P:\A Harvest of Health\Import"
ActiveWorkbook.SaveAs Filename:= _
"P:\A Harvest of Health\Import\Scan Genius Update Vendor Items & Add New Products.csv" _
, FileFormat:=xlCSV, CreateBackup:=False
Workbooks.Close
Application.DisplayAlerts = True
End Sub
Bookmarks