I have two macros I want to stitch together. Both on the bottom. How do you stitch them together? Is there an easy How-do somewhere?
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Range("A1").Sort Key1:=Range("A2"), _
Order1:=xlDescending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End Sub
and
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "F2" Then
If Range("F2") = True Then
dbox = InputBox("Input date MM/DD/YYYY (AFTER " & Format(Now(), "MM/DD/YYYY") & ")")
While dbox <= Format(Now(), "MM/DD/YYYY") And dbox <> ""
dbox = InputBox("Input date MM/DD/YYYY (AFTER " & Format(Now(), "MM/DD/YYYY") & ")")
Wend
Range("G2") = Format(dbox, "MM/DD/YYYY")
End If
End If
End Sub
I want to add more macros, but every time one is I add one, the next one won't work.
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Range("A1").Sort Key1:=Range("A2"), _
Order1:=xlDescending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End Sub
and
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "F2" Then
If Range("F2") = True Then
dbox = InputBox("Input date MM/DD/YYYY (AFTER " & Format(Now(), "MM/DD/YYYY") & ")")
While dbox <= Format(Now(), "MM/DD/YYYY") And dbox <> ""
dbox = InputBox("Input date MM/DD/YYYY (AFTER " & Format(Now(), "MM/DD/YYYY") & ")")
Wend
Range("G2") = Format(dbox, "MM/DD/YYYY")
End If
End If
End Sub
I want to add more macros, but every time one is I add one, the next one won't work.