Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi, i have cells that contain diff. formula and the first time i enter any
one of them then leave it (eg. use arrow key to scroll across columns in a given row) the worksheet change event is fired. is this a bug because nothing has changed in the cell (perhaps some recalculate event has fired?). the reason the above noted behaviour is a problem is because in my worksheet_change event i execute an Application.Undo and this line of code throws an error because nothing there is nothing to undo because nothing has actually changed. i don't know how to test for whether there is anything to undo. i found something about the undo list but can't figure out the syntax to access this "object". any help would be wonderful... cheers, pwrob -- xl help seeker |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Without seeing the worksheet event code, your questions cannot be answered
with accuracy. However, it is doubtful that there is a bug in the system software. The problem is most likely in the structure of the event code. This can oftem be remedied by using an If ... Then statement to set a criteria that must exist before the event code will fire. As and example only: Private Sub Worksheet_Change(ByVal Target As Range) If Taget = Range("C5" ) Then 'Do something End If End Sub If the target range was C5 then the code would execute the Do Something line, otherwise it does nothing. "pwrob" wrote in message ... hi, i have cells that contain diff. formula and the first time i enter any one of them then leave it (eg. use arrow key to scroll across columns in a given row) the worksheet change event is fired. is this a bug because nothing has changed in the cell (perhaps some recalculate event has fired?). the reason the above noted behaviour is a problem is because in my worksheet_change event i execute an Application.Undo and this line of code throws an error because nothing there is nothing to undo because nothing has actually changed. i don't know how to test for whether there is anything to undo. i found something about the undo list but can't figure out the syntax to access this "object". any help would be wonderful... cheers, pwrob -- xl help seeker |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Fire Worksheet_change event from module | Excel Programming | |||
Worksheet_Change does it fire for a cell changed via foruma? | Excel Programming | |||
Navigating between cells | Excel Discussion (Misc queries) | |||
Navigating through Cells | Excel Discussion (Misc queries) | |||
Worksheet_Change event won't fire to execute Macro??? | Excel Programming |