I am not familiar with VBA, but seems like my code is wrong, please advise me how to fix these codes.
VB Code:
Dim cbBox As Control For Each cbBox In [Form_Barclaycard Ladies Entry - Images_v2] Dim intAttempt As Integer Dim intAttemptPrevious As Integer Dim intAttemptFuture As Integer For intAttempt = 1 To 10 If cbBox.Name = "Attempt" & CStr(intAttempt) & "Com" Then If cbBox.Text = "" Then cbBox.Locked = False cbBox.BackColor = -2147483643 Else For intAttemptPrevious = intAttempt To 1 cbBox.Locked = True cbBox.BackColor = 16777164 Next For intAttemptFuture = (intAttempt + 1) To 10 cbBox.Locked = True Next End If End If Next Next




Reply With Quote