V
voodooJoe
i never heard of a 'comment' property and you don't say what kind of object.
what i'll assume is you want to associate some sort of permanent text
string?
depending on the object, i sometimes i hijack another property for what I
want. the TAG property (e.g., userforms, toolbar buttons) as easy when
available
sometimes its easy to use a custom document property, a name, a cell on a
hidden sheet, or a registry entry (check out savesetting and getsetting
fuctions)
you can attach to any existing object model if you could create your own
object:
Public Type objWS
sht As Worksheet
myComment As String
End Type
Sub x()
Dim s As objWS
Set s.sht = Sheet1
s.myComment = "some text"
Debug.Print s.sht.Name & " " & s.cmt
End Sub
HTH - voodooJoe
what i'll assume is you want to associate some sort of permanent text
string?
depending on the object, i sometimes i hijack another property for what I
want. the TAG property (e.g., userforms, toolbar buttons) as easy when
available
sometimes its easy to use a custom document property, a name, a cell on a
hidden sheet, or a registry entry (check out savesetting and getsetting
fuctions)
you can attach to any existing object model if you could create your own
object:
Public Type objWS
sht As Worksheet
myComment As String
End Type
Sub x()
Dim s As objWS
Set s.sht = Sheet1
s.myComment = "some text"
Debug.Print s.sht.Name & " " & s.cmt
End Sub
HTH - voodooJoe