Need a break from work? Unable to install any games? Introdcing VBA Minesweeper!
This is an old game which I had created in the past during my free time in my previous workplace, and am putting it online for everyone to play.
- Unique maps randomly generated at the start of game
- Tiles surrounding empty spaces are opened automatically
- In game timer
- Flag tiles as possibly being mines
- Custom games with specifiable map size (from 2x2 to 500x500) and number of mines
Microsoft Excel with macros enabled. This was created using a 2010 version of Excel on Windows, but is likely to work on much older versions as well.
To view the code press Alt
and F11
to open the VBA editor.
After opening the document, ensure that macros are enabled. Click on Start / Reset
to bring up the menu.
Click on the Simple
tab.
- Select a map size, which ranges from a 10x10 grid to a 50x50 one.
- Select a difficulty level which determines the percentage of tiles that are filled with mines.
- Click start to begin the game.
Click on the Custom
tab.
- Enter the desired width and height for the map size. Maps of up to 500x500 can be made.
- Enter the number of mines.
- Click start to begin the game.
In game instructions are available and can be accessed from the Instructions
tab.
A game is finished either by opening all non-mine tiles or by opening a mine. This is followed by a message with the time taken, tiles opened and number of mines present.