#1   Report Post  
newbie6182000
 
Posts: n/a
Default Date Stamp


I have been trying to use this modified macro, but there seems to be a
problem with a debug error. In addition, how can I use this macro for
the whole workbook. Is there a way of copying a template worksheet and
rename it with a customer name and also put the entry in cell a1. Any
help will be great.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'a modification to the one written previously by Barrie Davidson
If Target.Column = 4 Or 10 Or 16 Or 22 Then
'If Target.Offset(0, -3).Cells = "" Then
Target.Offset(0, -3).Value = Now()
End If
'End If
End Sub

Original that seems to work

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'Written by Barrie Davidson
If Target.Column = 4 Then
'If Target.Offset(0, -3).Cells = "" Then
Target.Offset(0, -3).Value = Now()
End If
'End If
End Sub


--
newbie6182000
------------------------------------------------------------------------
newbie6182000's Profile: http://www.excelforum.com/member.php...o&userid=25068
View this thread: http://www.excelforum.com/showthread...hreadid=385874

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

To make it applicable to the whole workbook, create the event procedure in
the ThisWorkbook code module, with a different first line

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)


--
HTH

Bob Phillips

"newbie6182000"
wrote in message
news:newbie6182000.1rxaeb_1120946702.3211@excelfor um-nospam.com...

I have been trying to use this modified macro, but there seems to be a
problem with a debug error. In addition, how can I use this macro for
the whole workbook. Is there a way of copying a template worksheet and
rename it with a customer name and also put the entry in cell a1. Any
help will be great.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'a modification to the one written previously by Barrie Davidson
If Target.Column = 4 Or 10 Or 16 Or 22 Then
'If Target.Offset(0, -3).Cells = "" Then
Target.Offset(0, -3).Value = Now()
End If
'End If
End Sub

Original that seems to work

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'Written by Barrie Davidson
If Target.Column = 4 Then
'If Target.Offset(0, -3).Cells = "" Then
Target.Offset(0, -3).Value = Now()
End If
'End If
End Sub


--
newbie6182000
------------------------------------------------------------------------
newbie6182000's Profile:

http://www.excelforum.com/member.php...o&userid=25068
View this thread: http://www.excelforum.com/showthread...hreadid=385874



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create a schedule from a list of dates ? Gavin Morris Charts and Charting in Excel 2 October 28th 10 04:08 PM
Separating date from a Date & Time stamp JT Excel Discussion (Misc queries) 9 June 10th 08 05:55 PM
Can excel have a button to input (stamp) the systems date and/or . abe Excel Worksheet Functions 5 April 24th 07 10:00 PM
date stamp Chris Excel Discussion (Misc queries) 2 May 10th 05 04:15 PM
bringing data from one workbook to another using a date stamp func tifosi3 Excel Worksheet Functions 0 April 5th 05 12:13 AM


All times are GMT +1. The time now is 05:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"