quote:
Originally posted by mwe99
lol wow am i confused
no wonder
First of all disregard everything Blade has said... sorry Blade, but yours make no sense at all. As Segosa said, that isn't even logic programming code.
quote:
Originally posted by Millenium_edition
if you would have used arrays of buttons, you'd only have to write one procedure and it would have been much easier.
indeed. And this is the way to go for something like this...
code:
Option Explicit
Dim CurrentBox As Byte
Private Sub Form_Load()
CurrentBox = 1
Call ClearBoxes
End Sub
Private Sub cmdColor_Click(Index As Integer)
cmdFinal(CurrentBox).BackColor = cmdColor(Index).BackColor
CurrentBox = CurrentBox + 1
If CurrentBox = 5 Then
Call Validate
'
CurrentBox = 1
Call ClearBoxes
End If
End Sub
see attached zip for full example code