Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Which data have been entered into a cell ?

Hello there,

I need to react to the data that a user may enter into
certain cells (XL XP).

How can I programmatically catch the entry that has
been made ?

Help greatly appreciated.

Kind regards,

H.G. Lamy



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Which data have been entered into a cell ?

HG,

You need the Worksheet_Change event.

You test for what has been entered by testing the Target argument. For
instance, if you want to react to all changes in column N, use

If Target.Column = 14 Then

If you want to test for cells B5:G7 say, use

If (Not Intersect(Target,Range("B5:G7")) Is Nothing) Then

and then do your stuff.

As this is worksheet code, it goes into the worksheet code module.


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"hglamy" wrote in message
...
Hello there,

I need to react to the data that a user may enter into
certain cells (XL XP).

How can I programmatically catch the entry that has
been made ?

Help greatly appreciated.

Kind regards,

H.G. Lamy





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Which data have been entered into a cell ?

Use the Change event procedure in the Sheet's code module. E.g.,

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$A$1", "$B$2", "$C$3"
MsgBox "You changed one of these cells"
Case Else
MsgBox "You changed cell " & Target.Address
End Select
End Sub


--
Cordially,
Chip Pearson
Pearson Software Consulting, LLC
Microsoft MVP - Excel
www.cpearson.com


"hglamy" wrote in message
...
Hello there,

I need to react to the data that a user may enter into
certain cells (XL XP).

How can I programmatically catch the entry that has
been made ?

Help greatly appreciated.

Kind regards,

H.G. Lamy





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Which data have been entered into a cell ?

Thank you !

I had tried to work with the "Selection_Change" event,
but with "Worksheet_Change" you pointed me to the right direction !

Kind regards,

H.G. Lamy


"hglamy" schrieb im Newsbeitrag
...
Hello there,

I need to react to the data that a user may enter into
certain cells (XL XP).

How can I programmatically catch the entry that has
been made ?

Help greatly appreciated.

Kind regards,

H.G. Lamy





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
LOCK CELL AFTER DATA IS ENTERED MIke Excel Discussion (Misc queries) 4 October 24th 07 12:33 AM
Change color of cell when different cell has data entered B J G Excel Discussion (Misc queries) 1 October 18th 07 07:59 PM
How do I get data automatically entered into a cell? rldjda Excel Worksheet Functions 1 January 18th 07 07:19 AM
data changes when entered into a cell Ian Gill Excel Worksheet Functions 1 October 10th 06 05:39 PM
Lock Data in Cell after entered CrimsonPlague29 Excel Discussion (Misc queries) 0 May 9th 06 11:51 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"