J
Janie
I am looking for something to help with my documentation that I can use to
cycle through the controls on a User Form and list the properties of that
control.
When I read about Properties collection in Help, it appears that only
applies to SmartTags.
I know how to get the value of a property, but I don't want to have to enter
name of every property of each control. I'm looking for something that can
count the number of propeties for that particular control and then list them
and their value out. This is what I have:
Sub ListProps()
Dim intFormCount As Integer, intCounter As Integer
intFormCount = frmMyForm.Controls.Count
For intCounter = 0 To intFormCount - 1
With frmMyForm.Controls(intCounter)
Debug.Print .Name & vbtab & .Font
End With
Next
End Sub
This is what I need:
Sub ListProps()
Dim intFormCount As Integer, intProp As Integer, intCounter As Integer
intFormCount = frmMyForm.Controls.Count
For intCounter = 0 To intFormCount - 1
With frmMyForm.Controls(intCounter)
For intProp=1 to .Properties.Count
Debug.Print .Properties(intProp).Name & vbtab & .Properties(intProp).Value
Next
End With
Next
End Sub
Except that Properties only applies to SmartTags.
Any bright ideas out there?
Many thanks
Janie
cycle through the controls on a User Form and list the properties of that
control.
When I read about Properties collection in Help, it appears that only
applies to SmartTags.
I know how to get the value of a property, but I don't want to have to enter
name of every property of each control. I'm looking for something that can
count the number of propeties for that particular control and then list them
and their value out. This is what I have:
Sub ListProps()
Dim intFormCount As Integer, intCounter As Integer
intFormCount = frmMyForm.Controls.Count
For intCounter = 0 To intFormCount - 1
With frmMyForm.Controls(intCounter)
Debug.Print .Name & vbtab & .Font
End With
Next
End Sub
This is what I need:
Sub ListProps()
Dim intFormCount As Integer, intProp As Integer, intCounter As Integer
intFormCount = frmMyForm.Controls.Count
For intCounter = 0 To intFormCount - 1
With frmMyForm.Controls(intCounter)
For intProp=1 to .Properties.Count
Debug.Print .Properties(intProp).Name & vbtab & .Properties(intProp).Value
Next
End With
Next
End Sub
Except that Properties only applies to SmartTags.
Any bright ideas out there?
Many thanks
Janie