Howard,
Just as "My Stuff" is not a legal, valid name for a control on
userforms, neither is it for AX controls on sheets. Do not confuse the
naming convention used for Forms controls with that of AX controls.
Think of it this way...
In the VBE code window:
In the left side dropdown:
General
CheckBox1
Worksheet
..,where in a userform code window...
In the left side dropdown:
General
CheckBox1
Userform
...where the concept of object hierarchy is identical. The AX control
Name property is not a string, but rather the 'codename' of the object
which can be used to ref the control in code.
Because Forms controls are Shape objects, they are an entirely
different species and handled same as any other Shape object.
So in your code sample...
Private Sub Stuff_Click()
' Handles code for an AX CheckBox control renamed "Stuff"
' Note that this name does not comply with any naming convention
standard
Dim cb As CheckBox
Set cb = Me.Stuff
Debug.Print cb.Caption
End Sub
...where the result should be "Stuff It" according to the info you
provide here.
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion