How to run Multiple Macro's in Worksheet?

Giganews Newsgroups
Subject: How to run Multiple Macro's in Worksheet?
Posted by:  Ben Dummar
Date: Mon, 22 May 2006

Hi,

When I use the following macro's one at a time in the worksheet they work
great.  What do I need to do to be able to run both of them in the same
worksheet at the same time?

Thanks,
Ben

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'to install -- right-click on the sheettab of the corresponding
' sheet and choose 'view code'.  Paste the following procedure
' in the module.
  If Target.Column <> 2 Then Exit Sub
  If Target.Row = 1 Then Exit Sub
  On Error GoTo ErrHandler
  Application.EnableEvents = False
  Dim R As Long
  R = Target.Row
  Target.Offset(0, 2).Value = Date

ErrHandler:
  Application.EnableEvents = True
End Sub

Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Range("l2:l15"), Target) Is Nothing Then Exit Sub
Application.EnableEvents = False
Range("l2:m15").Sort Key1:=Range("l2")
Application.EnableEvents = True
End Sub

Replies