J
J.W. Aldridge
HI.
I seem to have a problem.........
Anytime I attempt to add an additional (change event) code to a
worksheet, it seems to go haywire.
(Is there somekind of rule that you cant have two separate change
events triggering at the same time?)
So,
Could someone help me to combine the following two event codes?
First one gives me my date and time stamp.
Second one forces upper case on a particular row.
__________________
#1
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo ws_exit
If Not Intersect(Target, Me.Columns(3)) Is Nothing Then
Me.Range("B" & Target.Row).Value = Time
End If
Me.Range("A" & Target.Row).Value = Date
ws_exit:
Application.EnableEvents = True
On Error GoTo 0
End Sub
___________________________________________________
#2
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Error_handler
If Not Intersect(Range("D"), Target) Is Nothing Then
With Target
If Not .HasFormula Then
Application.EnableEvents = False
.Value = UCase(.Value)
End If
End With
End If
Error_handler:
Resume Next
Application.EnableEvents = True
End Sub
I seem to have a problem.........
Anytime I attempt to add an additional (change event) code to a
worksheet, it seems to go haywire.
(Is there somekind of rule that you cant have two separate change
events triggering at the same time?)
So,
Could someone help me to combine the following two event codes?
First one gives me my date and time stamp.
Second one forces upper case on a particular row.
__________________
#1
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo ws_exit
If Not Intersect(Target, Me.Columns(3)) Is Nothing Then
Me.Range("B" & Target.Row).Value = Time
End If
Me.Range("A" & Target.Row).Value = Date
ws_exit:
Application.EnableEvents = True
On Error GoTo 0
End Sub
___________________________________________________
#2
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Error_handler
If Not Intersect(Range("D"), Target) Is Nothing Then
With Target
If Not .HasFormula Then
Application.EnableEvents = False
.Value = UCase(.Value)
End If
End With
End If
Error_handler:
Resume Next
Application.EnableEvents = True
End Sub