LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ben Dummar
 
Posts: n/a
Default How to run Multiple Macro's in Worksheet?

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




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run macros on protected worksheet paul Excel Worksheet Functions 0 February 4th 06 11:53 AM
toolbar macros that dont change when worksheet is renamed marlin40 New Users to Excel 1 November 21st 05 07:25 PM
Using worksheet functions in macros in Excel2000 clippan Excel Worksheet Functions 1 November 17th 05 11:53 PM
separate worksheet into multiple worksheets by grouping BPM001 Excel Worksheet Functions 1 November 5th 05 02:48 AM
Reference the worksheet from a multiple worksheet range function ( DBickel Excel Worksheet Functions 1 May 28th 05 03:49 AM


All times are GMT +1. The time now is 04:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"