Hi Jamie
Pursuant to you're PM request, replace the CurrentOrders Code with this
Sub CurrentOrders()
Dim myBtn As Shape
Dim ws1 As Worksheet
Dim cel As Range
Dim LR As Long
Set myBtn = ActiveSheet.Shapes(Application.Caller)
Set ws1 = Sheets("THEORY")
Set cel = myBtn.TopLeftCell
Application.ScreenUpdating = False
Application.EnableEvents = False
With ws1
If Not .Cells(cel.Row, 4).Value = "" And Not .Cells(cel.Row, 5).Value = "" Then
LR = .Range("H" & .Rows.Count).End(xlUp).Row + 1
.Cells(LR, 9).Value = .Cells(cel.Row, 1).Value
.Cells(LR, 10).Value = .Cells(cel.Row, 4).Value
.Cells(LR, 8).Value = .Cells(3, "U").Value
.Cells(LR, 11).Value = .Cells(cel.Row, 5).Value
.Cells(LR, "N").Value = cel.Row
.Cells(cel.Row, "C").Value = .Cells(cel.Row, "C").Value - .Cells(cel.Row, "E").Value
.Cells(cel.Row, "E").Value = ""
.Cells(cel.Row, "D").Value = ""
.Range("H3:N" & LR).Sort Key1:=.Range("H4"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End If
End With
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
The ChangeEvent Code behind Sheets THEORY should be entirely commented out or removed.
Bookmarks