![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: Paul
Posts: 34
|
Hi All,
How does the following code have to be amended to recognise a change in a specific single cell, rather than any cells in the worksheet? Private Sub Worksheet_Change(ByVal Target As Range) Excuse ignorance but why doesn't something like the following work? Private Sub Sheets("Sheet2").Cells(1,1)_Change(ByVal Target As Range) Ta very much! Cheers - Paul |
|
|
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi
Try this Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$1" Then 'DO IT End If End Sub |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Just to add to Dave's reply:
The code MUST be in Sheet2 code module, not in a regular module. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|