ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Make a cell in excel an object in VB (https://www.excelbanter.com/excel-programming/303139-re-make-cell-excel-object-vbulletin.html)

OZDOC1050[_3_]

Make a cell in excel an object in VB
 
Private Sub Worksheet_Change(ByVal Target As Range)
Dim R As Range
Set R = Application.Intersect(Target, Range("F9:F15"))
If R Is Nothing Then Exit Sub
YOUR CODE HERE
End Sub

EDIT THE RANGE TO SUIT
R
PETE

--
(][ This Email has been scanned by Norton AntiVirus. ][)
"CTInt04" wrote in message
...
HI,

We would like to make a range of cells a single object so that when a

change is made only to one of those cells we can run an event procedure.
We are currently using the:

Private Sub Worksheet_Change function

But it runs the event procedure when you click anywhere on the sheet and

we only want it to run when a cell in the range is changed.

Is making a range of cells an object what we need to do in order to

accomplish this if so tell us how, if not do you have any other suggestions.


Thank you in advance,
CTInt04





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com