Results 1 to 4 of 4

Worksheet event to run macro when cell changes

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    387

    Worksheet event to run macro when cell changes

    Hi All,

    I would like to aks whether someone can help me with the below.

    I m trying ot have a worksheet event trigger when a certain value changes. So if the value in cell D5 changes, a worksheet event calls a macro.

    For a strange reason the macro is not being called when the value changes.

    Can someone please help me out.

    Appreciate a lot your help!

    For ease of reference I have attached the file.



    Option Explicit
    
    
    
     
    
    Private Sub Worksheet_Change(ByVal Target As Range)
    ActiveSheet.Unprotect Password:="k"
        If Target.Address(0, 0) = "d5" Then
           Call Allbalance
       
        End If
    ActiveSheet.Protect Password:="k"
    End Sub


    Thanks


    Keibri
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Trigger a macro or worksheet event with a UDF?
    By aquixano in forum Excel Charting & Pivots
    Replies: 10
    Last Post: 03-22-2016, 06:42 AM
  2. why a Worksheet Change Event during a macro
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2014, 09:31 PM
  3. [SOLVED] worksheet event to triger macro
    By mrl in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-04-2013, 08:43 AM
  4. [SOLVED] Event macro to skip worksheet
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2012, 11:42 AM
  5. Event macro that targets specific worksheet
    By retseort in forum Excel General
    Replies: 3
    Last Post: 02-20-2006, 10:47 AM
  6. [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
  7. [SOLVED] Worksheet Change event code moved to Worksheet Calculate event... and it's not working
    By KimberlyC in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-23-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