LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Date stamp function

I am trying to use the time and date stamps worksheet event macro from
McGimpsey but running into a few problems.

1. The worksheet I'm using is protected and this code won't run when the
worksheet is protected.

2. I already have a Worksheet_Change function to format cells for upper and
proper case. Do I have to incorporate the time and date stamps worksheet
event macro into my change case macro, if so any suggestions would be greatly
appreciated. Here is a part of the code.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo CleanUp
Application.EnableEvents = False
Select Case Target.Address
Case "$J$4"
Target(1).Value = UCase(Target(1).Value)
Case "$AC$4"
Target(1).Value = StrConv(Target(1).Value, vbProperCase)
Case "$H$5"
Target(1).Value = StrConv(Target(1).Value, vbProperCase)
Case "$H$41"
Target(1).Value = StrConv(Target(1).Value, vbProperCase)
Case "$AW$4"
Target(1).Value = StrConv(Target(1).Value, vbProperCase)
Case "$BP$5"
Target(1).Value = UCase(Target(1).Value)
Case "$AP$7"
Target(1).Value = UCase(Target(1).Value)
Case "$F$7"
Target(1).Value = UCase(Target(1).Value)
Case "$BH$24"
Target(1).Value = UCase(Target(1).Value)
End Select
CleanUp:
Application.EnableEvents = True
End Sub

3. I would like to use the date stamp function for multiple entries(A60 to
A82). Here is what I had for one.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("AR60:BX60"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, -43).ClearContents
Else
With .Offset(0, -43)
.NumberFormat = "dd mmm yy hh:mm"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With

Sorry for the length of this post.

Tim



 
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
Date Stamp Sam H[_2_] Excel Discussion (Misc queries) 7 March 23rd 10 10:44 AM
Separating date from a Date & Time stamp JT Excel Discussion (Misc queries) 9 June 10th 08 05:55 PM
Create a button that will date stamp todays date in a cell Tom Meacham Excel Discussion (Misc queries) 3 January 11th 06 01:08 AM
Date stamp spreadsheet in excel to remind me of completion date Big fella Excel Worksheet Functions 1 October 18th 05 04:10 PM
date stamp Chris Excel Discussion (Misc queries) 2 May 10th 05 04:15 PM


All times are GMT +1. The time now is 12:25 AM.

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

About Us

"It's about Microsoft Excel"