+ Reply to Thread
Results 1 to 3 of 3

Problem with timestamp code

  1. #1
    Registered User
    Join Date
    12-11-2007
    Posts
    1

    Problem with timestamp code

    I'm trying to trigger a timestamp when certain cells are filled in a spreadsheet. The code I'm using works fine when entering one cell at a time, it doesn't work when I paste multiple cells. Any ideas?

    Thanks much!


    The code:

    Private Sub Worksheet_Change(ByVal Target As Range)
    Sheet1.Unprotect
    For Each Cell In Target
    If Cell.Column >= 2 Then
    If Cells(Cell.Row, 2) <> "" And Cells(Cell.Row, 3) <> "" And Cells(Cell.Row, 4) <> "" And Cells(Cell.Row, 5) <> "" And Cells(Cell.Row, 6) <> "" And Cells(Cell.Row, 7) <> "" And Cells(Cell.Row, 8) <> "" And Cells(Cell.Row, 9) <> "" And Cells(Cell.Row, 10) <> "" Then Cells(Cell.Row, 1) = Now
    End If
    Next Cell
    Sheet1.Protect
    End Sub
    Last edited by Rtoro; 12-11-2007 at 12:06 PM.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Rtoro

    Welcome to excelforum

    Please read forum rules & post your thread in the correct forum

    I have moved this thread to the correct forum - Excel Programming

    A thread with the rules is available at the top of each forum or see link below for rules
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Try this

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

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