Hi Howard,
Am Sun, 16 Jun 2013 20:30:57 +0200 schrieb Claus Busch:
> But another tipp: Put only code of worksheet events in the code module
> of the worksheet. And in code module of the workbook only code with
> workbook events. All other subs or functions put in a standard module.
in code module of sheet3 you have:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Target.Row = 1 Or Target.Row = 4 Or Target.Row = 7 Or Target.Row = 10
_
Or Target.Row = 13 Or Target.Row = 16 Or Target.Row = 19 Or Target.Row =
2 Then
Target.Offset(0, 1).Select
End If
If Target = Range("AB12") Then
Target.CheckSpelling SpellLang:=1033
End If
End Sub
This long IF construct is better and easier to write as a Select Case
statement:
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Row
Case 1, 2, 4, 7, 10, 13, 16, 19
Target.Offset(0, 1).Select
End Select
If Target.Address(0, 0) = "AB12" Then
Target.CheckSpelling SpellLang:=1033
End If
End Sub