Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is Cells(1,1) a range? 1

Status
Not open for further replies.

markask

Programmer
Joined
Apr 28, 2005
Messages
167
Location
GB
Hi,

In Excel.

I want to know any change in cells(1,1) but this wont work:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target is Cells(1, 1) then
Is Cells(1,1) a range?

Thank you in advance.
 
A starting point:
Dim r As Range
Set r = Intersect(Target, Cells(1, 1))
If Not r Is Nothing Then MsgBox "A1 changed"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV,

Thank you for quick response.

I just not understand why we cannot use "is" for two ranges, Target and Cells(1,1)
 


Target may be DIFFERENT than Cells(1,1) yet intersects.

Skip,

[glasses] [red]Be advised:[/red]We know Newton's 3 Laws. But did you hear about the [red]FOURTH???[/red]
Only ONE fig per cookie![tongue]
 
SkipVought,

Thank you. Can I:
If Target.Address = Cells(1, 1).Address
 
And what should happen if Target is, say, Range("A1:A3") ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top