ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   triogger reset (https://www.excelbanter.com/excel-programming/386153-triogger-reset.html)

Curt

triogger reset
 
trying to leave a 0.00 entry on sheet 1 all entry is done on this sheet. Have
most all working with the exception of the zero trigger. If i put the target
=10 above the call for copycomp fails to trigger. If I put it after it
changes the entry to (10). And call functions. Need to be able to make this
call and leave 0.00 entry in this trigger cell. This 0.00 entry can come at
any row level. Following is code from sheet 1 First three calls work fine.
Can it be reset to zero from comp worksheet?
Hope we can do it
Thanks in Advance
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
On Error GoTo errhandler
Application.EnableEvents = False
If Target.Column = 9 And Target.Value 1 And IsNumeric(Target.Value)
Then _
Call CopyMailE(Target)
If Target.Column = 12 And Target.Value 10 And IsNumeric(Target.Value)
Then _
Call CopyDonors(Target)
If Target.Column = 12 And Target.Value 10 And IsNumeric(Target.Value)
Then _
Call CopyMailD(Target)
If Target.Column = (12) And Target.Value <= 0 And
IsNumeric(Target.Value) Then _
Call Copycomp(Target)
If Target.Column = (12) Then _
Target.Value = 10
Application.EnableEvents = True
Exit Sub
errhandler:
Application.EnableEvents = True
End Sub

Public Sub Copycomp(ByVal Target As Range)
Dim wksSummary As Worksheet
Dim rngPaste As Range
Set wksSummary = Sheets("Comp")
Set rngPaste = wksSummary.Cells(65536, "A").End(xlUp).Offset(0, 0)
Application.EnableEvents = False
Set rngPaste = rngPaste.Offset(1, 0)
rngPaste = Range(Target.Offset(0, -7), Target.Offset(0, 0))
Range(Target.Offset(0, -7), Target.Offset(0, 0)).Copy _
Destination:=rngPaste
rngPaste.Offset(0, 7) = Target
Application.EnableEvents = True
End Sub


All times are GMT +1. The time now is 12:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com