Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default How stop the navigation to other cells?

You will need to setup a Range object variable and a boolean variable in the
global section of the worksheet object, which then via the ChangeSelection
Event, you will need to run a data validation check. However, be alert for
infinite looping. That's cause even when the code changes the selection
back to the original cell via this event, this event is triggered again,
thus why you need the global [to the module] boolean variable. The first
time the event is triggered, it will see if the boolean variable is "True",
and since it will not be, it will do the data validation check:

If Boolean Then
Boolean = False
Else
If datavalidation is True Then
Set the Range Object to the new selection
Else
Set the boolean variable to True
Via the Range variable, select the original range with the Select
Method
End If
End If

Now if the "Else" part of the above condition is issued, the Change Event
will be triggerred a second time, so early in the code, you will need to
test of the boolean is "True" and if it is, then just set the Boolean
variable to "False" and exit the macro, else run the Data Validation check.

--
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"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.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default How stop the navigation to other cells?

Thank you both I'll give it a try....
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop re-calculating all cells? Eric Excel Discussion (Misc queries) 1 September 29th 07 02:58 PM
STOP BLANK CELLS JFAZ Excel Worksheet Functions 2 January 17th 06 04:33 PM
How do I stop cells from expanding? frodomojo New Users to Excel 3 May 29th 05 10:32 PM
How do I stop other circles in other cells to stop selecting? stauff Excel Worksheet Functions 2 October 29th 04 09:02 PM
How stop the navigation to other cells? Tom Ogilvy Excel Programming 1 September 10th 03 07:45 AM


All times are GMT +1. The time now is 11:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"