In vb6 I used code to loop through the objects in a form to see if they changed. If so, a boolean was set to true. something like this:
However, when I use the same code in vs 2008 and irrespective of the form, I get 'express is of type ..., which is not a collection'. Is there a way to accomplish the same?
Thanks.
Code:
Public Sub FormChange(ByRef bFormChange As Boolean)
Dim obj As Object
For Each obj In frmSStab
If TypeOf obj Is TextBox Then
If obj.DataChanged Then
bFormChange = True
mdiMain.Caption = txtFirstname.Text & " " & txtLastname.Text & "*"
End If
End If
Next obj
End Sub
Thanks.