Results 1 to 5 of 5

Issue with Private sub working with some columns and not others

Threaded View

  1. #1
    Registered User
    Join Date
    07-29-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Issue with Private sub working with some columns and not others

    Attempting to put time stamp at the end of a modified row using borrowed script from another thread. The borrowed script works well but the modified script doesn't. I am attempting to put a timestamp at the end of the row if anything is modified between columns 13 and 22 and put the time stamp in the corresponding row cell on column 25. The original puts the date stamp on the first column cell of any column modified between rows 2 and 17. Not sure why this won't work. All of this script was placed in the worksheet and not in a module. The first set of code is the original and the second is the modified code. The original code works well, but my modified code doesn't work at all. Any help is greatly appreciated.

    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim c As Range
        Application.EnableEvents = False
        For Each c In Target
            If c.Column > 1 And c.Column < 18 Then
                Cells(c.Row, 1) = Now
            End If
        Next c
        Application.EnableEvents = True
    End Sub
    
    
    Private Sub Existing_Entries(ByVal Target As Range)
        Dim c As Range
        Application.EnableEvents = False
        For Each c In Target
            If c.Column > 12 And c.Column < 23 Then
                Range(c.Row, 25) = Now
            End If
        Next c
        Application.EnableEvents = True
    End Sub
    Last edited by thumperjlp; 09-01-2013 at 06:31 PM. Reason: Clarification

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Private Sub Workbook_BeforeClose() really isn't working
    By kartune85 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-05-2016, 04:03 PM
  2. [SOLVED] Private sub worksheet_change not working
    By DavidBW in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-21-2013, 06:06 PM
  3. Private Sub Workbook_BeforePrint not working
    By Dutchbeer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2013, 10:05 AM
  4. Private Sub Workbook_SheetChange..issue
    By jw01 in forum Excel General
    Replies: 4
    Last Post: 08-09-2011, 12:38 PM
  5. [SOLVED] Private sub worksheet_change(bval target as range) issue
    By Darren in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2006, 08:10 AM

Tags for this Thread

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