• Top Members
    Reps
    Posts
  • 834 Replies
    2585 Replies
  • 713 Replies
    2021 Replies
  • 331 Replies
    1928 Replies
The site is still being updated (as of 14th Jan 2018 6PM GMT) but can be used in the meantime.

For each

Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
User avatar
Dummy1912
VIP - Donator
Posts: 1947

For each

Tue Jan 02, 2018 10:05 am

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

User avatar
CodenStuff
Site Admin
Posts: 4348

Re: For each

Wed Jan 03, 2018 3:41 pm

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
Posts: 1947

Re: For each

Wed Jan 03, 2018 4:10 pm

Hello,

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

any ideas please

Post Reply

Return to “Coding Help & Support”