Where is the keypress event while editing a cell 
Author Message
 Where is the keypress event while editing a cell

Hi,
yes subject is the question. I want to catch the keypress or keydown event
when the current cell is being edited. Is it possible?

Thanks in advance.



Tue, 31 Aug 2004 07:27:39 GMT  
 Where is the keypress event while editing a cell
No such event exists.  Everything in Excel comes to a halt while a cell is
being edited...

-Matt Tedford


Quote:
> Hi,
> yes subject is the question. I want to catch the keypress or keydown event
> when the current cell is being edited. Is it possible?

> Thanks in advance.



Tue, 31 Aug 2004 07:45:32 GMT  
 Where is the keypress event while editing a cell
You can only catch the event before... selection of a cell

maby you could use a before right click, or before double click event to
capture something, or use data validation to insure only what you want gets
typed in, or use a form.

Just some thoughts

James


Quote:
> No such event exists.  Everything in Excel comes to a halt while a cell is
> being edited...

> -Matt Tedford



> > Hi,
> > yes subject is the question. I want to catch the keypress or keydown
event
> > when the current cell is being edited. Is it possible?

> > Thanks in advance.



Tue, 31 Aug 2004 12:34:52 GMT  
 Where is the keypress event while editing a cell
Thanks for your suggestions
but what do you mean by 'use data validation...' This was exactly what i
wanted to do. Shortly, i want  the typer to enter the same value twice to
keep the typing mistakes minimum. When the typer finishes editing a cell a
form with a textbox comes up and she should type it again. If the
textbox.text and the cell.value is the same then accept.

The problem is that if the textbox.txt is different then cell.value then i
need to go back to the cell that was being edited because i can only catch
the cell edited event after the user presses enter or tab or clickes on
another cell. Now the 'active cell' is not the one that was edited. ??????


Quote:
> You can only catch the event before... selection of a cell

> maby you could use a before right click, or before double click event to
> capture something, or use data validation to insure only what you want
gets
> typed in, or use a form.

> Just some thoughts

> James



> > No such event exists.  Everything in Excel comes to a halt while a cell
is
> > being edited...

> > -Matt Tedford



> > > Hi,
> > > yes subject is the question. I want to catch the keypress or keydown
> event
> > > when the current cell is being edited. Is it possible?

> > > Thanks in advance.



Wed, 01 Sep 2004 17:26:06 GMT  
 Where is the keypress event while editing a cell

Quote:
> The problem is that if the textbox.txt is different then cell.value then i
> need to go back to the cell that was being edited because i can only catch
> the cell edited event after the user presses enter or tab or clickes on
> another cell. Now the 'active cell' is not the one that was edited. ??????

Hi Faruk,

    The Worksheet_Change event passes you a reference to the cell that was
modified, so you can use that reference to return the user to that cell if
the entries don't match.

Private Sub Worksheet_Change(ByVal Target As Range)
    ''' Show the form asking the user to retype the entry
    ''' If the entry is incorrect, put them back in the changed cell.
    Target.Select
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *




Wed, 01 Sep 2004 19:48:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Creating Custom Event Handler (KeyPress Event)

2. Assigning event to Shift-Tab in KeyPress event

3. Button events don't fire when editing a cell

4. Button events won't fire when editing a cell

5. Button events won't fire when editing a cell

6. In vbs exist the keypress event

7. Keypress event

8. How can I catch a keypress-event?

9. catch the keypress-event to delete records

10. KeyPress Event and Enter key


 
Powered by phpBB® Forum Software © phpBB Group