Playing Sounds in Excel Using VBA – part #2

03/03/2011

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…

Read More >>

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

03/01/2011

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]

Read More >>

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

02/24/2011

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]

Read More >>

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

02/23/2011

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]

Read More >>

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

02/16/2011

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]

Read More >>

Easy Zoom – Chart Axis Scaling Using VBA

02/15/2011

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….

Read More >>