print the date/time last edited

M

Michelle

Let's try that again.

http://i100.photobucket.com/albums/m29/teacher24_70/
MiscScreenShots/VBScreenshot.jpg

Forgive me for getting a little lost when following the 2-way debate
about this.  I wanted to test this just to see if I could figure out
how to do this portion.  I changed that one portion of the code that
you requested, but I must still be doing something wrong.  I entered
the code where you directed, but I'm not seeing anything change on the
worksheet.  When I add or change something in column A, I'm seeing
nothing appear is column B.

Here's a screenshot of the module--hopefully it will come through
okay.

http://i100.photobucket.com/albums/m29/teacher24_70/
MiscScreenShots/VBScreenshot.jpg

Please change:

If Not Intersect(Target, Range("A:A")) Is Nothing Then
 
M

Michelle

Let's try that again.

http://i100.photobucket.com/albums/m29/teacher24_70/
MiscScreenShots/VBScreenshot.jpg

Forgive me for getting a little lost when following the 2-way debate
about this.  I wanted to test this just to see if I could figure out
how to do this portion.  I changed that one portion of the code that
you requested, but I must still be doing something wrong.  I entered
the code where you directed, but I'm not seeing anything change on the
worksheet.  When I add or change something in column A, I'm seeing
nothing appear is column B.

Here's a screenshot of the module--hopefully it will come through
okay.

http://i100.photobucket.com/albums/m29/teacher24_70/
MiscScreenShots/VBScreenshot.jpg

Please change:

If Not Intersect(Target, Range("A:A")) Is Nothing Then
 
M

Michelle

Let's try that again.

http://i100.photobucket.com/albums/m29/teacher24_70/
MiscScreenShots/VBScreenshot.jpg

Forgive me for getting a little lost when following the 2-way debate
about this.  I wanted to test this just to see if I could figure out
how to do this portion.  I changed that one portion of the code that
you requested, but I must still be doing something wrong.  I entered
the code where you directed, but I'm not seeing anything change on the
worksheet.  When I add or change something in column A, I'm seeing
nothing appear is column B.

Here's a screenshot of the module--hopefully it will come through
okay.

http://i100.photobucket.com/albums/m29/teacher24_70/
MiscScreenShots/VBScreenshot.jpg

Please change:

If Not Intersect(Target, Range("A:A")) Is Nothing Then
 
M

Michelle

Sorry my screenshot image code on Photobucket doesn't seem to be
working properly.


Let's try that again.

http://i100.photobucket.com/albums/m29/teacher24_70/
MiscScreenShots/VBScreenshot.jpg

Forgive me for getting a little lost when following the 2-way debate
about this.  I wanted to test this just to see if I could figure out
how to do this portion.  I changed that one portion of the code that
you requested, but I must still be doing something wrong.  I entered
the code where you directed, but I'm not seeing anything change on the
worksheet.  When I add or change something in column A, I'm seeing
nothing appear is column B.
Here's a screenshot of the module--hopefully it will come through
okay.
http://i100.photobucket.com/albums/m29/teacher24_70/
MiscScreenShots/VBScreenshot.jpg

On Aug 15, 9:35 am, Gord Dibben <gorddibbATshawDOTca> wrote:
Ooops!
Please change:
If Not Intersect(Target, Me.Range("A:A")) Is Nothing Then
To
If Not Intersect(Target, Range("A:A")) Is Nothing Then
Gord
 
G

Gord Dibben

Your *.jpg shows you placed the code into Sheet1 module.

As written it was to go into Thisworkbook Module per my instructions below.

Here is some revised code to cover more columns.

All sheets, columns A:C with a stamp into D1

Code goes into Thisworkbook module.

Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Intersect(Range(Target(1).Address), _
Range("A:A,B:B,C:C")) Is Nothing Then Exit Sub
With Target
If .Value <> "" Then
Sh.Range("D1").Value = Format(Now, "dd mmm yyyy hh:mm:ss")
End If
End With
ws_exit:
Application.EnableEvents = True
End Sub

===========================================================

If you jusr want the code to run on one sheet use this.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Intersect(Range(Target(1).Address), _
Range("A:A,B:B,C:C")) Is Nothing Then Exit Sub
If Not Intersect(Target, Me.Range("A:A,B:B,C:C")) Is Nothing Then
With Target
If .Value <> "" Then
Me.Range("D1").Value = Format(Now, "dd mmm yyyy hh:mm:ss")
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub

Code goes into the sheet module.

Right-click on the sheet tab and "View Code"

Copy/paste into that sheet module.

Don't forget to delete the Thisworkbook code if you go with the one sheet
only code.


Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top