Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default change event procedure

Do you know how to adapt the code,

Private Sub Worksheet_Change(ByVal Target As Range)

to execute when one particular cell is changed rather than any cell in the
worksheet?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default change event procedure

Ben,

To have it only look at cell A2:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$A$2" Then Exit Sub
....


HTH,
Bernie
MS Excel MVP

"benb" wrote in message
...
Do you know how to adapt the code,

Private Sub Worksheet_Change(ByVal Target As Range)

to execute when one particular cell is changed rather than any cell in the
worksheet?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default change event procedure

Private Sub Worksheet_Change(ByVal Target As Range)

if target.address= "$A$1" Then
'etc.
End If

End Sub

--

HTH

RP

"benb" wrote in message
...
Do you know how to adapt the code,

Private Sub Worksheet_Change(ByVal Target As Range)

to execute when one particular cell is changed rather than any cell in the
worksheet?



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
Validation Procedure with a worksheet change event Bhupinder Rayat Excel Worksheet Functions 2 October 3rd 07 05:18 PM
workbook_Open event Procedure peerless Excel Discussion (Misc queries) 1 May 22nd 06 10:21 PM
workbook_Open event Procedure peerless Excel Discussion (Misc queries) 0 May 22nd 06 10:16 PM
programming the VBE for a new event procedure mark kubicki Excel Programming 3 August 18th 04 04:43 PM
OnTime event not firing in Workbook_Open event procedure GingerTommy Excel Programming 0 September 24th 03 03:18 PM


All times are GMT +1. The time now is 10:59 PM.

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"