Here is the macro that I'm running:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("A:D"), .Cells) Is Nothing Then
Application.EnableEvents = False
With Range("J" & Target.Row)
If Not IsDate(.Value) Then
ActiveSheet.Unprotect Password:="judiciary"
.NumberFormat = "mmm dd yyyy"
.Value = Date
ActiveSheet.Protect Password:="judiciary"
'DrawingObjects:=True, Contents:=True, Scenarios:=True
End If
End With
Application.EnableEvents = True
End If
End With
End Sub
If I enter "text" into columns A through D then the current date is automatically entered in column J fine. But in column A and B, I usually type numbers here. Column A is just straight numbers 00-99. In column B, I type the time here and the cell is formatted to ##":"##. It enters the colon automatically (1015 = 10:15). So when I type numbers into column A or B something gets messed up and freezes the spreadsheet because I think its expecting "text" or alpha letters in these cells for the date to auto appear in column J.
Also this formula:
=IF(LEN(H6)>0,H6-E6,0)
is to calculate the change to give back to the customer also freezes up the spreadsheet when I enter the Cash Given column. So first I enter the Amount Due and everything is fine, then when I enter the Cash Given and its about to calculate the Change that I have to give back, that's when it freezes.
Again, everything worked fine on Office 2010 with no problems. This is only happening on Office 2003 and I haven't tested it on Office 2007 yet. The computers in our office are using all different versions of Office which is very frustrating.
Thanks for all your help.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("A:D"), .Cells) Is Nothing Then
Application.EnableEvents = False
With Range("J" & Target.Row)
If Not IsDate(.Value) Then
ActiveSheet.Unprotect Password:="judiciary"
.NumberFormat = "mmm dd yyyy"
.Value = Date
ActiveSheet.Protect Password:="judiciary"
'DrawingObjects:=True, Contents:=True, Scenarios:=True
End If
End With
Application.EnableEvents = True
End If
End With
End Sub
If I enter "text" into columns A through D then the current date is automatically entered in column J fine. But in column A and B, I usually type numbers here. Column A is just straight numbers 00-99. In column B, I type the time here and the cell is formatted to ##":"##. It enters the colon automatically (1015 = 10:15). So when I type numbers into column A or B something gets messed up and freezes the spreadsheet because I think its expecting "text" or alpha letters in these cells for the date to auto appear in column J.
Also this formula:
=IF(LEN(H6)>0,H6-E6,0)
is to calculate the change to give back to the customer also freezes up the spreadsheet when I enter the Cash Given column. So first I enter the Amount Due and everything is fine, then when I enter the Cash Given and its about to calculate the Change that I have to give back, that's when it freezes.
Again, everything worked fine on Office 2010 with no problems. This is only happening on Office 2003 and I haven't tested it on Office 2007 yet. The computers in our office are using all different versions of Office which is very frustrating.
Thanks for all your help.