ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How stop the navigation to other cells? (https://www.excelbanter.com/excel-programming/276505-re-how-stop-navigation-other-cells.html)

Tom Ogilvy

How stop the navigation to other cells?
 
Use the newer events: worksheet_Change and/or Worksheet_SelectionChange

Onentry only fires when a user makes an entry/edits a cell. thus a user can
move all over the sheet without triggering onentry.

the SelectionChange fires whenever the user changes the selection with the
keyboard or the mouse.

these events are found in the sheet module for the sheet. Change is similar
to onEntry. If you are going to perform an action in the event code that
would trigger another event, be sure to set Application.EnableEvents = False
before doing it and turn it back to true before you leave the sub

--
Regards,
Tom Ogilvy

"Michel" wrote in message
om...
I'm using Excel 2000/win98:
Worksheets("test").OnEntry = subEntry()
Before leaving the sub I want to go and stay in a specified Cell, but
the enter, cursor, home, ... has still to be executed and changes
that!
I tried .previous.select or .offset(0,1).select but this does only
work on ENTER and not on column A nor does it work with the
cursor-movements.

What I even want more is not allowing to leave the active row and
sheet until all cells on that row are filled in as needed or left
total empty. So how do I trigger movement out of 1 row?

Thanks already for reading it.




Michel[_3_]

How stop the navigation to other cells?
 
"Tom Ogilvy" wrote in message ...
Use the newer events: worksheet_Change and/or Worksheet_SelectionChange


Thanks, but I guess I will still have the problem of stopping a
navigation after programcode-exit. I mean when someone uses
cursor-down which triggers Worksheet_SelectionChange and this sub
wants to select a special cell, then the cursor down will still be
executed! So is there a way to clear the keyboard buffer?


All times are GMT +1. The time now is 05:16 AM.

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