View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default 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.