Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Looks like bad code to me :)
the next should be an end if Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Address(False, False) = "D1" Then If IsNumeric(.Value) Then Application.EnableEvents = False Range("c1").Value = Range("c1").Value + .Value Application.EnableEvents = True End If End If End With End Sub i wouldn't know why enableevents would matter unless there is more code somewhere. -- -John Please rate when your question is answered to help us and others know what is helpful. "peyman" wrote: hi, I'm using the following code taken from "McGimpsey & Associates" site and it works nicely for me but I'm not able to undrestand how the code works and what its logic is.can anybody explain to more about this codes,particulary the line "Application.EnableEvents = False or true"?thanx. Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Address(False, False) = "D1" Then If IsNumeric(.Value) Then Application.EnableEvents = False Range("c1").Value = Range("c1").Value + .Value Application.EnableEvents = True End If Next End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
accumulator with other than one | Excel Worksheet Functions | |||
Date STOP Accumulator | Excel Discussion (Misc queries) | |||
Need help with two cell accumulator | Excel Worksheet Functions | |||
Two cell accumulator | Excel Worksheet Functions | |||
Two cell accumulator | Excel Worksheet Functions |