Hi, I have a friend who's trying to make a memory game and we're kind of stump of what is wrong with the code. We've narrowed down that it pertains to this section of it:

If turn = 1 Then
    tempturn = 2
    picval1 = click
    previndex = Index
End If

If turn = 2 Then
    tempturn = 1
    picval2 = click
If picval1 <> picval2 Then
timWait.Interval = 1000

    Picture0(Index).Visible = True
    Picture0(previndex).Visible = True
End If
End If
turn = tempturn

There is more than 2 of each picture, and it's not showing the 2nd picture selected.

you should decclare previndex static or global not inside the procedure..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.