Consulting

Results 1 to 3 of 3

Thread: Solved: Run Macro on Cell Change

  1. #1

    Solved: Run Macro on Cell Change

    Hey all,

    Im looking to run a macro when a cell value changes.

    ex

    When cell F9 changes (any change) run macro sub Candyman ().

    Thanks much ahead of time

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    [VBA]
    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)
    On Error GoTo Exits
    Application.EnableEvents = False
    If Target.Address = "$F$9" Then
    Call Candyman
    'do other stuff
    End If
    Exits:
    Application.EnableEvents = True
    End Sub

    [/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    Excellent! Thanks much


Posting Permissions

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