How can I have 2 worksheet proccedures on the same sheet?
Is it possible? How to make it happen?
Thanks so much!!! Mike
Here is my codes:
#1
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then
Exit Sub
End If
On Error GoTo ErrHandler:
If Not Application.Intersect(Me.Range("A5:B1200"), Target) Is Nothing Then
If IsNumeric(Target.Value) = False Then
Application.EnableEvents = False
Target.Value = StrConv(Target.Text, vbProperCase)
Application.EnableEvents = True
End If
End If
ErrHandler:
Application.EnableEvents = True
End Sub
#2
Private Sub Worksheet_Change(ByVal Target As Range)
Set MyPlage = Range("M5:M1200")
For Each Cell In MyPlage
If Cell.Value = "Monday" Then
Cell.Interior.ColorIndex = 45
End If
If Cell.Value = "Tuesday" Then
Cell.Interior.ColorIndex = 4
End If
If Cell.Value = "Wednesday" Then
Cell.Interior.ColorIndex = 18
End If
If Cell.Value = "Thursday" Then
Cell.Interior.ColorIndex = 6
End If
If Cell.Value = "Friday" Then
Cell.Interior.ColorIndex = 12
End If
If Cell.Value = "Saturday" Then
Cell.Interior.ColorIndex = 18
End If
If Cell.Value = "Sunday" Then
Cell.Interior.ColorIndex = 22
End If
Next
End Sub
Bookmarks