Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Trap whether it was TAB or arrow keys etc

Is it possible to determine how a user exited a cell? I can track the last
cell address and new cell address but that doesn't tell me whether they
tabbed through the cell or clicked out. I want to set a default value for
columns and if the user TAB's through or presses the space bar and then
TAB's over I want to complete the cell with the default value.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Trap whether it was TAB or arrow keys etc

There might be some API that would give you that information but I can't
think how to implement to your requirement. That aside I don't think it's
possible, if I'm wrong you can be pretty sure someone will step in.

Does it have to be a keyboard movement. You say you already have a method to
store the last selected cell, so why not compare it's address with the next
selected cell. If it's adjacent, and within the range you want to treat,
then treat it as if were selected with keyboard arrow or tab.

Something to bear in mind, if user tabs through a multicell selection, a
selection-change event is not triggered. However a change event is triggered
if tab or enter is used to complete the entry of the last active cell. But
note, the target cell that's returned in the event is the new active cell,
not the cell that's just changed. Confused!

Regards,
Peter T

"HotRod" wrote in message
...
Is it possible to determine how a user exited a cell? I can track the last
cell address and new cell address but that doesn't tell me whether they
tabbed through the cell or clicked out. I want to set a default value for
columns and if the user TAB's through or presses the space bar and then
TAB's over I want to complete the cell with the default value.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Trap whether it was TAB or arrow keys etc

I've worked around this by having the user enter a "space" in the cell and
then continue on. Entering a space will enter the default value for that
column.


Quick other question I'm hoping you can help with when I use "Target.Column"
I get the number "1" how do I use the number to reference a cell at
A12 with the worksheets("mysheet").range().value ???


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Trap whether it was TAB or arrow keys etc

rw = 12
col = Target.column
msgbox Worksheets("mysheet").Cells(rw,col).Value

--
Regards,
Tom Ogilvy

"HotRod" wrote in message
...
I've worked around this by having the user enter a "space" in the cell and
then continue on. Entering a space will enter the default value for that
column.


Quick other question I'm hoping you can help with when I use

"Target.Column"
I get the number "1" how do I use the number to reference a cell at
A12 with the worksheets("mysheet").range().value ???




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
Arrow Keys Terry Excel Discussion (Misc queries) 1 April 21st 10 03:12 PM
Using arrow keys DL Excel Discussion (Misc queries) 4 November 10th 08 06:46 PM
Arrow Keys longfingers Excel Discussion (Misc queries) 2 September 14th 07 05:19 AM
Arrow keys Kim Excel Discussion (Misc queries) 2 March 21st 05 09:02 PM
arrow keys Dean Excel Discussion (Misc queries) 1 February 14th 05 02:29 PM


All times are GMT +1. The time now is 04:09 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"