Contact E-Mail address:klste@hotmail.de
 

 

 

 

Snake game in Excel VBA

 

This game is an Excel file programmed in VBA. The game is played from a user form. Playing field is 20 × 20 squares. In the beginning, the snake has a yellow head and four orange body parts. The snake is supposed to catch the blue rabbit. The rabbit doesn't run away and just waits for Snake to catch it. After each captured rabbit, the snake's body becomes one box longer and the player receives one point. The snake can be up to 299 orange boxes long. The new rabbit appears in a different box. If the new rabbit cannot be seen, the snake should keep moving and the new rabbit will come out. Four buttons with arrows control the movement of the snake; the direction of the arrow is the direction of movement.

The game is started with the "Start" button, the four control buttons will be visible and the result is no points.

If the snake leaves the playing field or bites into its own body, the four control buttons are hidden and the game is canceled.