Adding custom property to Range object
You could add a worksheet name like so
rng.Parent.Names.Add _
Name:=rng.Parent.Name & "!Add_" & rng.Address(False, False), _
RefersTo:="myCustomProp"
and read it like so
MsgBox Evaluate(rng.Parent.Names(rng.Parent.Name & "!Add_" &
rng.Address(False, False)) _
.RefersTo)
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Morgan" wrote in message
. ..
Hi all,
We have a need to attach some information to some cells in a worksheet
programmatically. We do not want user to see or be able to change/remove
attached information. We are currently using ID property, but it has some
draw backs, e.g. not persisted when saving the Excel file, can be moidfied
when data validation is used. I am wondering whether there is a way to add
custom property to the Range object so we can use that to store the
information.
Thanks in advance,
Morgan Cheng
|