Playing Sounds in Excel Using VBA – part #2


This section explains how to create a compound sound effect from elementary sounds. In the first example (two macros), the sound is played in a loop which is a native internal loop within the “PlaySound” function (using the flag option: SND_LOOP = &H8). A second function (the “Beep” function) creates a tone generator with adjustable frequency and play time. The Beep function is also used in a fourth macro, creating a sound which goes…


How to make a game of PONG in Excel – part #6


In the previous section a special ball return formula was implemented. Bat #1 was assigned the y-coordinate of the ball and in this way a very simple opponent algorithm was implemented. The problem with this algorithm is that by having Bat #1 perfectly tracking the ball, the opponent was unbeatable. This section shows how to add adjustable skill levels to the virtual pong opponent. [sociallocker][/sociallocker]


How to make a game of PONG in Excel – part #2


In this section two bats are created (the opponent’s bat and the player’s bat). The player’s bat movements are controlled by the vertical mouse movement. The geometry of movement, placement and charting of the bats are explained. [sociallocker][/sociallocker]


How to make a game of PONG in Excel – part #1


This post contains the first part of a series of tutorials demonstrating how to build a lively game of Pong in Excel. The section deals with the bat movement VBA macro, and plotting the “court” or “tennis-table”  on a 2D scatter chart. [sociallocker][/sociallocker]


Creating, Sizing, Translating and Rotating 2D Shapes in Excel 2007


Most of the models on this blog are designed for Excel 2003 or earlier versions. Sometimes however, Excel 2007 or 2010 are the only versions available even though they might be far slower when running these models. This presentation is an introduction to Excel 2007 and it was suggested to me by one of my readers. [sociallocker] [/sociallocker]


Easy Zoom – Chart Axis Scaling Using VBA


In certain models we need to be able to change the scale of the chart axes function of the result of a simulation. Excel charts do have auto-scaling as a default option but sometimes the scaling values we get are not what we need. Another reason against using auto-scaling is that during the time the model runs, the scale self-adjusts and it gives an ever changing, distorted view of the results….