erik.van.geit
MrExcel MVP
- Joined
- Feb 1, 2003
- Messages
- 17,832
As you know I'm not a "real programmer". Consequently this involves some limitations but also advantages. I will try out things which a programmer wouldn't, because he thinks it's not possible.Hi Erik
I'm not sure what you suggesting. Any change to a worksheet by a macro (called by OnTime or not) clears the undo stack. So even if you call the macro by OnTime, the undo stack will be cleared.
Or did I just completely fail to get what you were saying?
Perhaps my explanation in the other post was to short.
If you change sheet1 by code, you will still be able to have undo on sheet2. It is not OnTime specific.*if you absolutely want to use a cell, whithout the drawback, there is a trick: use running-clock on other (hidden) sheet and refer to there with a formula
Put =Sheet1!A1 in some cell on sheet2.
Change something on sheet2.
Run this code (even mutiple times)
Code:
Sub test()
With Sheets("Sheet1").Range("A1")
.Value = .Value & "&"
End With
End Sub
You have still Undi available, when you run
Code:
With Range("A1")
.Value = .Value & "&"
End With
If you want, throw me an email. "time running in cell" I'll send you an example.
best regards,
Erik