In Part1, the new version of xlCube (now referred to as xlCubeSuper) was introduced.
In Part2, I will describe the different techniques to make this game application work. But, before I do, I think that it is important to point out that the game is not tied down tight. For example, there is no workbook-level protection. If users wanted to, they could damage the integrity of the game by adding or deleting worksheets (if they saved the changes). So, the game is not tamper-proof and was never intended to be. Rather, it was made as a game to be enjoyed and an application to learn from. Here then is a list of the major techniques to be discussed.
- 3D formulas
- Defined named formulas
- Conditional formatting formulas
- Formulas to aggregate shots and hits
- Use of VBA to:
- Add 3D ranges
- Shoot using VBA event procedure.
- Create and delete non-ribbon (old style) menus.
- Store and sort game scores.
- Control the formatting of shots and hits.
- Display information and results.
The backbone of this game is the 3D formulas created to define virtual cubes and the center of those cubes. We will see in a later post how these formulas are generated through VBA, but for now, here is what they look like as shown in Name Manager.
In Part3 we will see how these formulas are created in random locations by VBA.