Frncis
Member
I have code that Chihiro provided to copy just the letter H to a second sheet.
The following code, changes all entries to Upper Case.
It also uses Private Sub Worksheet_Change(ByVal Target As Range), the same as the copy code. When I compile the total code, I get the following error message: Compile error: Ambiguous name detected Worksheet_Change
The above code works on sheet 2, because there is no other code on sheet 2, that uses Private Sub Worksheet_Change(BYVal target as Range).
I am trying to force the entries on sheet 1 to be Upper case. I really don't want to use Data Validation. The case change on sheet 2 is not noticeable to the user, & I am trying to do the same to sheet 1.
The following code, changes all entries to Upper Case.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Application.Intersect(Target, Range("D4:Q29")) _
Is Nothing) Then
With Target
If Not .HasFormula Then
Application.EnableEvents = False
.Value = UCase(.Value)
Application.EnableEvents = True
End If
End With
End If
End Sub
It also uses Private Sub Worksheet_Change(ByVal Target As Range), the same as the copy code. When I compile the total code, I get the following error message: Compile error: Ambiguous name detected Worksheet_Change
The above code works on sheet 2, because there is no other code on sheet 2, that uses Private Sub Worksheet_Change(BYVal target as Range).
I am trying to force the entries on sheet 1 to be Upper case. I really don't want to use Data Validation. The case change on sheet 2 is not noticeable to the user, & I am trying to do the same to sheet 1.