+ Reply to Thread
Results 1 to 4 of 4

run code if only cell is edited.

  1. #1
    Registered User
    Join Date
    06-27-2011
    Location
    srilanka
    MS-Off Ver
    Excel 2007
    Posts
    3

    Unhappy run code if only cell is edited.

    i have written this code in order to track cell changes in column 5 and enter current time stamp of cell changed in to a cell in column 4.what i want to achieve is that time stamp should only changed if i change value of a cell in column 5 only.but here in this code even if i click on a cell in column 5 it adds current time stamp in to column 4.please help on this.
    thanks.
    Please Login or Register  to view this content.
    Last edited by pubudu; 06-28-2011 at 05:52 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: run code if only cell is edited.

    Please edit your post to include code tags as per the forum rules

    3. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Select your code and click the [#] button at the top of the post window (if you are editing an existing post, press Go Advanced to see the [#] button).
    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: run code if only cell is edited.

    You seem to contradict yourself in your explanation. The code you have posted (other than the random 'SelectionChange(' bit which should be removed will put a date/time stamp in the adjacent cell in column 4 if a change is made in column 5.

    Dom

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: run code if only cell is edited.

    See your duplicate post for a workaround.

    http://www.excelforum.com/excel-prog...e-changed.html

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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