Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-21-2015, 12:38 PM
charlesdh charlesdh is offline a code to add altering time to cells Windows 7 32bit a code to add altering time to cells Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

HI,



Check this bit of code that I found. It may help you.
This code looks for changed data in column 5 row 5.
Should you need more help let us know.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.Column <> 5 Then Exit Sub  'D.McR 2001-11-02 worksheet.functions
   If Target.Row <> 5 Then Exit Sub
      Dim ccc As String
   ccc = Format(Date + Time, "mm/dd/yy hh:mm") _
      & " " & Target.Value  ' -- Application.UserName
   If Target.Comment Is Nothing Then
      Target.AddComment.Text ccc
   Else
      Target.Comment.Text (Target.Comment.Text & Chr(10) & ccc)
   End If
   Target.Comment.Shape.TextFrame.AutoSize = True
End Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
a code to add altering time to cells Code that will run when a cells value is changed. DonJohns1 Excel Programming 2 04-15-2015 10:48 AM
a code to add altering time to cells Code to disable spacing between cells in table properties bloomhaven Word VBA 3 03-11-2015 04:08 PM
To me the code on the youtube tutorial looks the same as mine but a I get a run-time chrisd2000 Excel Programming 1 07-02-2014 11:23 AM
a code to add altering time to cells Unlocking cells with VB code in excel 2003 tadleymansions Excel 1 01-18-2013 06:55 AM
a code to add altering time to cells How to get cells to calculate time? jrasche2003@yahoo.com Excel 2 02-09-2007 07:10 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft