Dear All,
I need the coding below to be available only when the user opens a certain book, the workbook the user opens is created by myself using VBA on a daily basis, is there away to add this code to the sheet1 module for the workbook I create or is there an easier way to do this.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column <> 5 Then
Exit Sub
Else
Select Case UCase(Target.Text)
Case "RICH"
Rows(Target.Row).Interior.ColorIndex = 37
Case "SCOTT"
Rows(Target.Row).Interior.ColorIndex = 6
Case "MATT B"
Rows(Target.Row).Interior.ColorIndex = 39
Case "MARK"
Rows(Target.Row).Interior.ColorIndex = 35
Case "MANDY"
Rows(Target.Row).Interior.ColorIndex = 40
Case "TORI"
Rows(Target.Row).Interior.ColorIndex = 38
Case ""
Rows(Target.Row).Interior.ColorIndex = 0
Case Else
End Select
End If
End Sub
any help is greatly appreciated.
Thanks Rob.![[yoda] [yoda] [yoda]](/data/assets/smilies/yoda.gif)
I need the coding below to be available only when the user opens a certain book, the workbook the user opens is created by myself using VBA on a daily basis, is there away to add this code to the sheet1 module for the workbook I create or is there an easier way to do this.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column <> 5 Then
Exit Sub
Else
Select Case UCase(Target.Text)
Case "RICH"
Rows(Target.Row).Interior.ColorIndex = 37
Case "SCOTT"
Rows(Target.Row).Interior.ColorIndex = 6
Case "MATT B"
Rows(Target.Row).Interior.ColorIndex = 39
Case "MARK"
Rows(Target.Row).Interior.ColorIndex = 35
Case "MANDY"
Rows(Target.Row).Interior.ColorIndex = 40
Case "TORI"
Rows(Target.Row).Interior.ColorIndex = 38
Case ""
Rows(Target.Row).Interior.ColorIndex = 0
Case Else
End Select
End If
End Sub
any help is greatly appreciated.
Thanks Rob.
![[yoda] [yoda] [yoda]](/data/assets/smilies/yoda.gif)