+ Reply to Thread
Results 1 to 12 of 12

trigger event not functioning

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-10-2019
    Location
    england
    MS-Off Ver
    2013
    Posts
    486
    Quote Originally Posted by Kenneth Hobson View Post
    Is the sheet protected?

    Was a cell in column 11+ changed manually?

    If the code in that sheet? Right click sheet tab, View Code.

    Did an error occur?

    Are macros enabled?

    Try closing Excel and reopen.
    No sheet not protected.
    Yes unchanged cell manually
    Yes macro enabled
    Workbook has 10+ macro
    I saved and reopened 3 times..
    The event is running in other sheets..
    But not this sheet..
    Am I missing something?

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: trigger event not functioning

    Likely you had an error. Errors need to be handled. The way the code is written, I doubt that you want multiple iterations.

    You can run Application.EnableEvents = True, close and reopen. For a one-off run of one line, I put it in Immediate window and enterkey at end.

    Then use the 2nd sub here. The 1st was my test. I found 78 runs for one change.
    Dim i as Integer
    
    Private Sub Worksheet_Change(ByVal Target As Range)
        i = i + 1
        Debug.Print i, Target.Address
        If Target.Column >= 12 Then Cells(Target.Row, 14) = Target.Value
    End Sub
    
    
    Private Sub Worksheet_Change(ByVal Target As Range)
        On Error Resume Next
        Application.EnableEvents = False
        If Target.Column >= 12 Then Cells(Target.Row, 14) = Target.Value
        Application.EnableEvents = True
    End Sub

+ 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. [SOLVED] Event Trigger Not Working
    By stevewest012 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-15-2018, 11:54 AM
  2. trigger an event if the cel value changes.
    By yoursamrit2000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2015, 06:38 PM
  3. [SOLVED] VBA to trigger event change
    By jrholden in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-26-2014, 11:34 AM
  4. beforedoubleclick event does not trigger
    By anneman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-22-2008, 11:49 AM
  5. [SOLVED] Event trigger in Excel?
    By Tim Miller in forum Excel General
    Replies: 1
    Last Post: 05-24-2006, 04:10 PM
  6. [SOLVED] Event Trigger
    By lobo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-16-2005, 04:35 PM
  7. Trigger Event Code
    By Shawn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2005, 10:05 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