ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I make an excel cell keypress event? (https://www.excelbanter.com/excel-programming/309314-how-can-i-make-excel-cell-keypress-event.html)

Chris DG

How can I make an excel cell keypress event?
 
I am using a Microsoft Excel 2000. I am VBA programmer. I am using an excel
custom template as a front-end for my access database. I want to validate
every keystroke done in an excel cell.

Rob Bovey

How can I make an excel cell keypress event?
 
"Chris DG" <Chris wrote in message
...
I am using a Microsoft Excel 2000. I am VBA programmer. I am using an

excel
custom template as a front-end for my access database. I want to validate
every keystroke done in an excel cell.


Hi Chris,

There's no way to do this in Excel. Have a look at the Data/Validation
menu. This is the feature used in Excel to ensure entries are allowable. It
may look a bit limited at first, but it's quite powerful when you use the
custom option to roll your own validation criteria using worksheet
functions.

Validation occurs as soon as the user hits Enter or does something else
that would complete the cell entry, like trying to tab away from the cell.
If the data entered doesn't pass validation, Excel will display a
configurable error message and prevent the user from leaving the cell until
validation is satisfied or the user cancels the entry.

--
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 *





All times are GMT +1. The time now is 02:13 AM.

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