+ Reply to Thread
Results 1 to 4 of 4

VBA help - multiple worksheet change events

  1. #1
    Registered User
    Join Date
    07-07-2016
    Location
    Chattanooga, TN
    MS-Off Ver
    365
    Posts
    4

    VBA help - multiple worksheet change events

    I'm new to VBA. I have the following VBA code in a workbook:

    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    On Error GoTo sub_exit
    If Target.Address = "$O$4" Then
    Range("M11:O16,M22:O28").ClearContents
    End If
    sub_exit:
    Application.EnableEvents = True
    End Sub


    However, I need another change to cause an event in a range. I need cells N11:N17 to clear contents when the selections in their corresponding cells in M11:M17 change and also for N22:N28 to clear contents when the selection in their corresponding cells M22:M28 change. (i.e. when a new selection is made in cell M11, then N11 clears).

    I'm using Data Validation Lists in these cells if that matters.

    Thanks for any insight someone could provide.

    I found some information in the below thread, but I had a hard time following exactly what to enter for the above to work (again, I am COMPLETELY NEW to VBA).


    http://www.excelforum.com/excel-prog...-multiple.html

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VBA help - multiple worksheet change events

    Try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-07-2016
    Location
    Chattanooga, TN
    MS-Off Ver
    365
    Posts
    4

    Re: VBA help - multiple worksheet change events

    Thank you sooooooo much. That worked perfectly!

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VBA help - multiple worksheet change events

    You're welcome.

+ 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. VBA Multiple Worksheet Change Events
    By Zimbo in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-24-2013, 10:58 AM
  2. Multiple Worksheet Change Events
    By justinharris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2011, 06:11 PM
  3. Question Regarding Multiple Worksheet Change Events
    By The Boosh! in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-21-2011, 10:19 AM
  4. Multiple Worksheet Change Events
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 12-13-2010, 06:14 PM
  5. Worksheet Multiple Change Events
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-24-2010, 02:02 AM
  6. Multiple change events in one worksheet?
    By JBW in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-22-2009, 01:33 AM
  7. Multiple Worksheet Change Events???
    By Potoroo in forum Excel General
    Replies: 3
    Last Post: 11-28-2006, 12:59 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