A worksheet cannot have multiple events of the same type.
Different types...........yes.........same type........no.
Sounds like you have more than one worksheet_change event in that sheet
module.
Either combine or change one of them to a different type.
BTW...............postal codes are in column 6...........is column 5 simply
province names?
I can't imagine you want the same format on both columns in that case.
Assumes you enter a province name in column 5 then a postal code in column 6
After the column 6 entry the code will run on both columns.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Range(Target(1).Address), _
Range("F:F")) Is Nothing Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
With Target
.Formula = UCase(Target.Formula)
.Value = (Left(Target.Value, 3) & " " & Right(Target.Value, 3))
End With
With Target.Offset(0, -1)
.Formula = UCase(.Formula)
End With
ErrHandler:
Application.EnableEvents = True
End Sub
Gord
On Sun, 17 May 2009 06:51:15 -0400, "Michael Koerner" <(E-Mail Removed)>
wrote:
>After a good nights sleep, your suggestion really made a lot of sense. thank
>you very much.
>
>But, when I tried to insert the macro you provided, I received a compile
>error indicating I had an ambiguous statement.
>
>I also have a couple of questions. The column with the postal code is column
>6. Your macro I believe indicated <>7 I would also like to have column 5 if
>possible in Upper Case as this is the prov/state column.
|