Pacman in visual basic for applications

0

I have a drawback I'm doing pacman in visual basic of excel , what I have is that when I press the keys the pacman moves me the image.

I have problems with the walls issue, I have the code so far

Select Case KeyCode
Case 37 'izquierda
pacmann.Left = pacmann.Left - 10

Case 38 'arriba
pacmann.Top = pacmann.Top - 10

Case 39 'derecha
pacmann.Left = pacmann.Left + 10

Case 40 'abajo
If (Label19.Top <> 222) Then

pacmann.Top = pacmann.Top + 10
End If
end select 

In the label19 is like a maze bar then that label19 has as head 222 then I defined that if the head of label19 is different to 222 then let it go down but when I do this I do not let go down to nowhere.

How do I solve the problem?

Case 40 'abajo
If (Label19.Top <> 222) Then

pacmann.Top = pacmann.Top + 10
End If
    
asked by paola 02.07.2017 в 06:45
source

0 answers