Hey guys,
I was trying out this VBA code I received from one of my "excel tips" emails and although it works, excel freezes up immediately after.
I am running Excel 2010 and the test file is saved as a 2003 workbook.
The code will change any text entered within the target range to uppercase.
I ran it a few times and it froze after each. (I guess I was expecting different results each time)
Any idea what could have caused the excel freeze?
Here is the code
[pre]
[/pre]
I was trying out this VBA code I received from one of my "excel tips" emails and although it works, excel freezes up immediately after.
I am running Excel 2010 and the test file is saved as a 2003 workbook.
The code will change any text entered within the target range to uppercase.
I ran it a few times and it froze after each. (I guess I was expecting different results each time)
Any idea what could have caused the excel freeze?
Here is the code
[pre]
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Application.Intersect(Target, Range("P3:P10")) Is Nothing) Then
With Target
If Not .HasFormula Then
.Value = UCase(.Value)
End If
End With
End If
End Sub