Results 1 to 5 of 5

Run macro everytime cell content changes

Threaded View

  1. #1
    Registered User
    Join Date
    01-12-2004
    Location
    NY
    Posts
    92

    Re: Code does not fire

    Hi SuitedAces,

    Instead of starting a new thread to post my own problem, I decided to reply to this particular post, since I am basically trying to re-use the same code.

    My problem is that the procedure does not fire. I have a validation list which feeds cell a43 (a named cell/range). Anyhow, based on the selection, the cursor should move to the specified cells. I am using excel 2k3. Macro security has been set at medium. I am thinking that perhaps I have a visual basic project "reference" turn off or something. Could you help? I am attaching the spreadsheet and the sheet code for reference. Rows above 43 are hidden... that's where I have place my lists.

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    Application.EnableEvents = False
    On Error Resume Next
    If Not Intersect(Target, Range("MyCell")) Is Nothing Then
        
        Select Case LCase(Target)
            
            Case "Sunday": Application.Goto Cells(43, "C")  'or Range("C43")
            Case "Monday": Application.Goto Cells(43, "AS")  'or Range("AS43")
            Case "Tuesday": Application.Goto Cells(43, "BO")  'or Range("BO43")
            Case "Wednesday": Application.Goto Cells(43, "CN")  'or Range("CN43")
            Case "Thursday": Application.Goto Cells(43, "DM")  'or Range("DM43")
            Case "Friday": Application.Goto Cells(43, "EL")  'or Range("EL43")
            Case "Saturday": Application.Goto Cells(43, "FK")  'or Range("FK43")
            
        End Select
        
    End If
    
    Application.EnableEvents = True
    
    End Sub
    Thanks in advance, I am sure you will be able to spot the mishap in a sec.

    Regards,
    nrage21
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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