Hello!
I've spent a while now looking online for a solution to my problem, but I'm still getting the same error. I have a range in a worksheet (LAYOUT) that I want sorted first by column B ascending then by column C ascending. I do NOT want to select or activate the worksheet, if that is possible. The code I am trying is this:
Sub Macro4()
Worksheets("LAYOUT").Range("A:D").Sort Key1:=Worksheets("LAYOUT").Columns("B"), Order1:=xlAscending, _ Key2:=Worksheets("LAYOUT").Columns("C"), Order2:=xlAscending, Header:=xlYes
End Sub
Thank you,
Horton
I've spent a while now looking online for a solution to my problem, but I'm still getting the same error. I have a range in a worksheet (LAYOUT) that I want sorted first by column B ascending then by column C ascending. I do NOT want to select or activate the worksheet, if that is possible. The code I am trying is this:
Sub Macro4()
Worksheets("LAYOUT").Range("A:D").Sort Key1:=Worksheets("LAYOUT").Columns("B"), Order1:=xlAscending, _ Key2:=Worksheets("LAYOUT").Columns("C"), Order2:=xlAscending, Header:=xlYes
End Sub
Thank you,
Horton