C
Curt
Have a conflict with copydonors. When code in place copy donors does not copy
as before. Also code when you hit enter on target cell returns you to next
line and column 'B' One time it did bring up msg box. anyone have any ideas
This old dog needs help
Thanks
Following is code
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo errhandler
Application.EnableEvents = False
If Target.column = 12 and Target.row > 1 then
set rng = Range(Range("L1"),Target)
if Application.Countblank(rng) > 0 then
msgbox "Don't leave any blank cells
target.clearcontents
target.end(xlup).offset(1,0).Select
Application.EnableEvents = True
exit sub
end if
If Target.Column = 12 And _
Target.Value > 10 And _
IsNumeric(Target.Value) Then
Call CopyDonors(Target)
Target.Value = 10 '< change the value after calling
the sub
elseif Target.Column = 12 And _
Target.Value <= 0 Then
Call Copycomp(Target)
end if
end if
Application.EnableEvents = True
Exit Sub
errhandler:
Application.EnableEvents = True
End Sub
as before. Also code when you hit enter on target cell returns you to next
line and column 'B' One time it did bring up msg box. anyone have any ideas
This old dog needs help
Thanks
Following is code
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo errhandler
Application.EnableEvents = False
If Target.column = 12 and Target.row > 1 then
set rng = Range(Range("L1"),Target)
if Application.Countblank(rng) > 0 then
msgbox "Don't leave any blank cells
target.clearcontents
target.end(xlup).offset(1,0).Select
Application.EnableEvents = True
exit sub
end if
If Target.Column = 12 And _
Target.Value > 10 And _
IsNumeric(Target.Value) Then
Call CopyDonors(Target)
Target.Value = 10 '< change the value after calling
the sub
elseif Target.Column = 12 And _
Target.Value <= 0 Then
Call Copycomp(Target)
end if
end if
Application.EnableEvents = True
Exit Sub
errhandler:
Application.EnableEvents = True
End Sub