Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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?




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
check or uncheck a check box based on a cell value RTKCPA Excel Discussion (Misc queries) 1 February 3rd 10 03:11 PM
Copy and move check box (check boxes) with new cell link? Marty Excel Worksheet Functions 1 January 20th 10 07:43 PM
Cannot check the check mark box in cell ac Excel Worksheet Functions 1 February 15th 08 10:24 PM
check to see if a cell is blank if not populate adjacent cell wit. Frusterated Excel Discussion (Misc queries) 6 September 14th 07 10:55 PM
Check if Conditional Format is True or False / Check cell Color Kevin McCartney Excel Worksheet Functions 5 June 29th 07 11:12 AM


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

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"