S
Slow1911s
code
I run the code and I get a Run-time 424 error, Object Required. I did
paste this together from a couple of different recorded macros - have I
not defined something I should have?
TIA
Private Sub CommandButton1_Click()
Dim ws2, ws3 As worksheet
Set sheets("sheet4") = ws2
Set sheets("Rep Summary") = ws3
ActiveWorkbook.RefreshAll
With ActiveSheet
Range("A104:B121").AdvancedFilter Action:=xlFilterInPlace,
CriteriaRange:=Range _
("c104:c105"), Unique:=False
End With
With ws2
Range("Rng_CR1").AdvancedFilter xlFilterCopy,
CopyToRange:=("Rng_CR2"), Unique:=True
Range("E2:E10000").Select
Selection.Sort Key1:=Range("E2"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
_
DataOption1:=xlSortNormal
Range("i2:i10000").Select
Selection.Sort Key1:=Range("i2"), Order1:=xlDescending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
_
DataOption1:=xlSortNormal
Range("j2:j10000").Select
Selection.Sort Key1:=Range("j2"), Order1:=xlDescending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
_
DataOption1:=xlSortNormal
End With
With ws3
Range("b12").Select
End With
End Sub
I run the code and I get a Run-time 424 error, Object Required. I did
paste this together from a couple of different recorded macros - have I
not defined something I should have?
TIA