Macro works in Excel 2010 but not in 2003

data808

Active Member
Joined
Dec 3, 2010
Messages
358
Office Version
  1. 2019
Platform
  1. Windows
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.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top