Results 1 to 5 of 5

Worksheet Change Event Wrongly Trigger

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    702

    Worksheet Change Event Wrongly Trigger

    Hi,

    I am writing Worksheet Change Event to enable auto trigger to clear contents from column "SC" to "TB" if user clear contents column "B" to "I".However, there is a bit error whereby the sheet will be triggered even if user clear contents for only one column between "B" to "I"

    Before this, i have used If Range("B" & i & ":I" & i) Is Empty Then but it does not work

    For the beginner like me, I am a bit confused on the term If Not Intersect(Target, Range()) Is Nothing Then


    Here is my code.
    Private Sub Worksheet_Change(ByVal Target As Range)
    
    i = ActiveCell.Row
    
        If Not Intersect(Target, Range("B" & i & ":I" & i)) Is Nothing Then
           Range("SC" & i).Resize(1, 26).ClearContents
        End If
     
    End Sub
    Then, my next confusion is should I choose Worksheet SelectionChange or Change as both seems to have the same output
    Last edited by Faridwahidi; 12-03-2014 at 10:25 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA to trigger event change
    By jrholden in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-26-2014, 11:34 AM
  2. [SOLVED] Trigger Change Event
    By alienware in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-27-2012, 07:25 AM
  3. Select Box Change Event Trigger
    By excelsupportforum in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-31-2012, 12:45 PM
  4. [SOLVED] Cell value change to trigger macro (worksheet change event?)
    By Neil Goldwasser in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2006, 10:00 AM
  5. [SOLVED] Worksheet Change Event-change event to trigger
    By Steph in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-18-2005, 06:05 PM

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