+ Reply to Thread
Results 1 to 9 of 9

VBA Multiple Worksheet Change Events

Hybrid View

  1. #1
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Private Sub Worksheet_Change(ByVal Target As Range)
       Application.EnableEvents = False
       
       If Not Intersect(Target, Range("A1")) Is Nothing Then
          Macro1
       ElseIf Not Intersect(Target, Range("A2")) Is Nothing Then
          Macro2
       ElseIf Not Intersect(Target, Range("A3:b10")) Is Nothing Then
          Macro3
       End If
       Application.EnableEvents = True
    End Sub
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  2. #2
    Forum Contributor
    Join Date
    02-01-2008
    Location
    Perth, Australia
    MS-Off Ver
    Excel 365
    Posts
    135

    Thumbs up Works a Treat

    Thanks Mudraker,

    That works perfectly.

    Cheers

    Adam

  3. #3
    Registered User
    Join Date
    07-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: VBA Multiple Worksheet Change Events

    Quote Originally Posted by mudraker View Post
    Private Sub Worksheet_Change(ByVal Target As Range)
       Application.EnableEvents = False
       
       If Not Intersect(Target, Range("A1")) Is Nothing Then
          Macro1
       ElseIf Not Intersect(Target, Range("A2")) Is Nothing Then
          Macro2
       ElseIf Not Intersect(Target, Range("A3:b10")) Is Nothing Then
          Macro3
       End If
       Application.EnableEvents = True
    End Sub
    ^ This really helped me out too, Mudraker. Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 08-16-2007, 05:51 AM
  2. Replies: 0
    Last Post: 05-27-2007, 10:22 PM
  3. Populating a worksheet from multiple IF statements
    By kaitewright in forum Excel General
    Replies: 1
    Last Post: 03-02-2007, 08:58 AM
  4. multiple worksheets into one worksheet
    By drocket in forum Excel General
    Replies: 3
    Last Post: 01-10-2007, 05:29 PM
  5. Help! Vba Copy Cell To Different Worksheet.
    By Dabooj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-03-2006, 05:53 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1