I'm having a heck of a time with this... I've written a few small macros that all get tied together and run via button in the user's sheet. My IT group just upgraded me from 2010 to 2016, and I mention that because a lot of what I've been seeing online has to do with that... but none of the solutions are working. This is NOT a protected workbook either. All this sheet does is take table data from JDA Space Planning, user dumps the raw data to Position and CutDown. Cutdown1 does compiles data from both and gets filtered to where one column = 1. Then pasted as values over to JDA. It's saved out as CSV, where JDA will pick it back up and execute automation scripts against it. These macros aren't nearly as complicated as I've written before in other Workbooks, but this 400 error is stopping me dead in my tracks. Here is my code, thank you all in advance:
Sub Set_Formats()
Sheets("CutDown").Activate
Worksheets("CutDown").ShowAllData
Sheets("Position").Activate
Range("A:H").NumberFormat = "@"
Sheets("CutDown").Activate
Range("A:H").NumberFormat = "@"
Sheets("CutDown1").Activate
Range("A:H").NumberFormat = "@"
End Sub
Sub Filter_To_Cutdowns()
Sheets("Cutdown").Activate
ActiveSheet.Range("$G:$G").AutoFilter Field:=8, Criteria1:=1, _
Operator:=xlAnd
End Sub
Sub Copy_Over_Cutdowns()
Sheets("CutDown1").Activate
ActiveSheet.UsedRange.Select
Selection.ClearContents
Sheets("CutDown").Activate
ActiveSheet.UsedRange.Copy
Sheets("CutDown1").Activate
Range("A1").PasteSpecial xlPasteValues
End Sub
Sub Trim_Columns()
Sheets("JDA").Activate
ActiveSheet.UsedRange.Select
Selection.ClearContents
Sheets("CutDown1").Activate
ActiveSheet.UsedRange.Select
ActiveSheet.UsedRange.Copy
Sheets("JDA").Activate
Range("A1").PasteSpecial xlPasteValues
Range("A:A,C:C,E:E,F:F,G:G,H:H").Delete
End Sub
Sub Export_CSV()
Application.DisplayAlerts = False
Sheets("JDA").Activate
ActiveWorkbook.SaveAs "C:\Temp\JDA\CutDowns.csv", FileFormat:=xlCSV, CreateBackup:=True
Application.DisplayAlerts = True
End Sub
Sub Run_Macros()
Application.Run "Set_Formats"
Application.Run "Filter_To_Cutdowns"
Application.Run "Copy_Over_CutDowns"
Application.Run "Trim_Columns"
Application.Run "Export_CSV"
Workbooks("CutDOwn1.xlsm").Close
End Sub