Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Feb 7, 10:45*am, Chip Pearson wrote:
You should disable events in the code: Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If Not Intersect(Target, Range("A1:B10")) Is Nothing Then * * * * Target =Time End If Application.EnableEvents = True End Sub Otherwise, the code will change a cell, which triggers _Change, which changes a cell, which triggers _Change, which changes a cell, which triggers _Change and on and on until VBA terminates the loop when it runs out of stack space. Cordially, Chip Pearson Microsoft Most Valuable Professional * * Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLCwww.cpearson.com That makes total sense, interestingly that annoying loop does not happen on my worksheet |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extracting the Time from a Date/Time Stamp | Excel Programming | |||
Date Capturing by Time | Excel Discussion (Misc queries) | |||
Comparing 2 files on date/time stamp, and based time difference do a subroutine | Excel Programming | |||
Capturing Time | Excel Programming | |||
time stamp a cell that doesn,t change when time stamping another | Excel Programming |