Posted on September 15, 2012.
![](/personal/images/connect-four.png)
This is a .xlsm file so you need to enable macros! For those using versions prior to Excel 2007, I have programmed it to use the ribbon but the game may still work.
With Connect Four, starting from some code I borrowed online (sorry I do not remember where), I decided to revamp it and make it more customizable. The additions I made to the game include playing two players, more robust code, and a few other changes.
Using the Ribbon Buttons
To reduce clutter on the screen, I decided to add all actions performed into the ribbon (see below). This ribbon menu gives you access to start a new game against a computer or against a friend. It also gives you control over who goes first.
![](/personal/images/connect-four-ribbon.png)
Playing the Game
The object of the game is to get four in a row, either vertically, horizontally, or diagonally. Click the column that you want to drop the piece in and it will fill in the lowest circle with your color.
![](/personal/images/connect-four-progress.png)