I figured out what was wrong with my code. So this works to where I can now click the button and the correct columns will do their thing -- autofilter to show non-blank cells, show print preview, then show all again.
Sub Print_Routing()
'
Dim PrintArr As Variant
PrintArr = Array("H")
For I = 0 To UBound(PrintArr)
Rows("1:2").Select
Selection.EntireRow.Hidden = True
Columns("H:H").Select
Selection.AutoFilter Field:=8, Criteria1:="<>"
Columns("D:EV").Hidden = True
Columns(PrintArr(I)).Hidden = False
ActiveSheet.PrintPreview
Next I
Rows("1:2").Select
Columns("D:EV").Hidden = False
Selection.EntireRow.Hidden = False
ActiveSheet.ShowAllData
End Sub
The only thing I can't do now is print down to the last active cell. I must've lost that code while messing with the rest of it.
Bookmarks