Interactive Spreadsheets: Blackjack

Unlike VBA, DataNitro runs without pausing Excel. If you have a giant spreadsheet, this can save you some time while you're working with it. Even better, it lets you create something new: interactive sheets. By running a script in the background you can make spreadsheets that respond dynamically to user actions.

Here's an example: blackjack.
(Download DataNitro and load the script in an empty sheet to try it out.)

Transforming Excel into a blackjack table

Type your bet directly into the spreadsheet when the script starts - no message boxes or set up values required.

Unlike VBA, the script runs in the background
						without freezing Excel

Play is also entirely in the spreadsheet. Datanitro can generate menus on the fly by detecting clicks, so you don't need to set up buttons in advance.

DataNitro can tell where the user clicks.  You
						don't need to set up buttons for input.

If you want, you can give yourself a few more chips or change some of the cards on the table - everything is stored directly in Excel, so you can play around with the state of the program.

The blackjack game in progress.

21 - a good time to stand.

Players wins!

Player wins! The game goes on until you or the bank run out of money.
This is a simple example, but it demonstrates how to transform a spreadsheet from a static presentation to an interactive one.

Here's a video of the game in action: