ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,738
- Office Version
- 2007
- Platform
- Windows
Hi,
I have two codes which both need to be under the Private Sub Worksheet_Change(ByVal Target As Range)
Like normal ive got into a mess & now confused.
Could you advise where ive gone wrong please.
Thanks.
Merged code supplied below
I have two codes which both need to be under the Private Sub Worksheet_Change(ByVal Target As Range)
Like normal ive got into a mess & now confused.
Could you advise where ive gone wrong please.
Thanks.
Merged code supplied below
Code:
Private Sub Worksheet_Change(ByVal Target As Range)If Target.Address = "$A$6" Then
Application.EnableEvents = False
Dim CustomerName As String
Worksheets("DATABASE").Select
CustomerName = Range("A6")
Worksheets("INFO").Select
Worksheets("INFO").Range("CF2").Select
If Worksheets("INFO").Range("CF2").Offset(1, 0) <> "" Then
Worksheets("INFO").Range("CF2").End(xlDown).Select
End If
ActiveCell.Offset(1, 0).Select
ActiveCell.Value = CustomerName
ActiveCell.Interior.ColorIndex = 6
ActiveCell.HorizontalAlignment = xlCenter
ActiveCell.VerticalAlignment = xlBottom
ActiveCell.VerticalAlignment = xlCenter
Selection.Borders.LineStyle = xlContinuous
ActiveCell.RowHeight = 19.5
ActiveCell.Font.Bold = True
Worksheets("DATABASE").Select
Application.EnableEvents = True
Else
With Target
If .Column = 13 Then Exit Sub
If .Count = 1 And Not .HasFormula Then
Application.EnableEvents = False
.Value = UCase(.Value)
Application.EnableEvents = True
End If
End With
End Sub