A
Accessed
How can a control on a Form not have a TYPE property ?????
This simple code in a form
=============================
Public Sub test()
Dim intcounter As Integer, IntCtrlCount As Integer
IntCtrlCount = Me.Controls.Count
On Error GoTo errhandle
For intcounter = 0 To IntCtrlCount - 1
Debug.Print Me.Controls(intcounter).NAME
Debug.Print Me.Controls(intcounter).Type
Me.Controls(intcounter).Enabled = False
Next
Exit Sub
errhandle:
Debug.Print CStr(Err) & " " & Error
Resume Next
End Sub
==============================
Produces these errors
Label51
438 Object doesn't support this property or method
438 Object doesn't support this property or method
CmdHoldFocus
438 Object doesn't support this property or method
Label53
438 Object doesn't support this property or method
438 Object doesn't support this property or method
...............................................................................
I know many controls do not have the ENABLED property, (like
CmdHoldFocus ) but those controls with the second error message (like
Label51, dont even seem to have the .TYPE property, which seems really
crazy to me.
How can a control not have a .TYPE property ??????
Does anyone know what is going on ?
Cheers
Ray
This simple code in a form
=============================
Public Sub test()
Dim intcounter As Integer, IntCtrlCount As Integer
IntCtrlCount = Me.Controls.Count
On Error GoTo errhandle
For intcounter = 0 To IntCtrlCount - 1
Debug.Print Me.Controls(intcounter).NAME
Debug.Print Me.Controls(intcounter).Type
Me.Controls(intcounter).Enabled = False
Next
Exit Sub
errhandle:
Debug.Print CStr(Err) & " " & Error
Resume Next
End Sub
==============================
Produces these errors
Label51
438 Object doesn't support this property or method
438 Object doesn't support this property or method
CmdHoldFocus
438 Object doesn't support this property or method
Label53
438 Object doesn't support this property or method
438 Object doesn't support this property or method
...............................................................................
I know many controls do not have the ENABLED property, (like
CmdHoldFocus ) but those controls with the second error message (like
Label51, dont even seem to have the .TYPE property, which seems really
crazy to me.
How can a control not have a .TYPE property ??????
Does anyone know what is going on ?
Cheers
Ray