For each

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts Page 1 of 1
Contributors
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

For each
Dummy1912
Hello,

and Happy newyear for everybody

I like to check my controls if none has the text 'Uncleared'
so all the controls need to have the text 'Cleared' before we can close the account
but when i use my code it still manage to lock the account :(

anyone please?
Code: Select all
For Each c As Control In UiGroupBox2.Controls
If (TypeOf c Is UiSummary) Then
If Not CType(c, UiSummary).txtstatus.Text = "Cleared" Then
 Exit Sub
                    Else
                        If TransToMy() Then 
                            SummaryPrevButton.txtstatus.Text = "Cleared"
                            SummaryPrevButton.Refresh()
                        End If
                        Exit Sub
                    End If
                End If
            Next c
Thanks
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

Re: For each
CodenStuff
Your code looks good.

Have you checked for case sensitivity?

Also try in reverse: IF text = "uncleared" THEN do this ELSE this
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: For each
Dummy1912
Hello,

Ooh that sound good,
but yes the case sensitivity is correct and still not working...

any ideas please
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
3 posts Page 1 of 1
Return to “Coding Help & Support”