I want to dump all the properties of a control in the debug window.
How can I list the properties without naming them ? (example:
text1.backcolor)
VB6
David
>I want to dump all the properties of a control in the debug window.
>
> How can I list the properties without naming them ? (example:
> text1.backcolor)
(Can't resist giving props to .NET here: Reflection sure is cool.)
You would need to use a library called TLBINF32.DLL to enumerate the
properties of your control. Search for it on Google. The help file has some
pretty good examples.
assuming there is a text box "Text0" and a cmd button "Command2" on the form
Private Sub Command2_Click()
Dim prp As Object
For Each prp In Text0.Properties
Debug.Print prp.Name
Next
End Sub
>I want to dump all the properties of a control in the debug window.
>
[quoted text clipped - 4 lines]
>
> David
RDub - 11 Jul 2008 15:48 GMT
OOOPS - Disregard last post.
Looking in the wrong group! I thought I was in an access.formscoding Group.
The code I posted works in Access VBA, I don't think this works with VB6,
controls do not have a Properites collection to iterate. Really sorry about
that :-(
Rdub
> assuming there is a text box "Text0" and a cmd button "Command2" on the
> form
[quoted text clipped - 17 lines]
>>
>> David
Bob Butler - 11 Jul 2008 15:50 GMT
> assuming there is a text box "Text0" and a cmd button "Command2" on the
> form
[quoted text clipped - 5 lines]
> Next
> End Sub
In VBA in Access, yes. In VB 6 or other flavors of VBA, no.