![]() |
Check the value of a cell from VBA?
I have been using Worksheet_SelectionChange (ByVal Target as Range) in my
worksheet module but I need to do the following. Lets assume that we are going to check cell B5 for the following qty/hp (ex 2/5). I need to examine B5 after the value has been entered and the user has either used the Enter key or the Tab key. How do I intercept this event? |
Check the value of a cell from VBA?
Use the change rather than selectionchange event
http://www.cpearson.com/excel/events.htm Chip Pearson's page on events. -- Regards, Tom Ogilvy "Bill Agee" wrote in message ink.net... I have been using Worksheet_SelectionChange (ByVal Target as Range) in my worksheet module but I need to do the following. Lets assume that we are going to check cell B5 for the following qty/hp (ex 2/5). I need to examine B5 after the value has been entered and the user has either used the Enter key or the Tab key. How do I intercept this event? |
Check the value of a cell from VBA?
You mean that the code should know wether the entry is finished by arrow
key, by mouseclick, by tab or by enter ? I don't think that is possible. But if you're just looking for the event for cell entries it's Private Sub Worksheet_Change(ByVal Target As Range) HTH. Best wishes Harald "Bill Agee" skrev i melding ink.net... I have been using Worksheet_SelectionChange (ByVal Target as Range) in my worksheet module but I need to do the following. Lets assume that we are going to check cell B5 for the following qty/hp (ex 2/5). I need to examine B5 after the value has been entered and the user has either used the Enter key or the Tab key. How do I intercept this event? |
All times are GMT +1. The time now is 02:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com