DIGITAL EDUCATION SUPPLEMENT: 2017 RETROSPECTIVE ISSN 2049-9663

A Visual Basic Scool Calculator

A screenshot of my calculator, by Terry Freedman

A screenshot of my calculator, by Terry Freedman

 

I came across a print-out of one of my first forays into programming with Visual Basic, circa 1994. I was already familiar with Basic, which I had taught for a number of years, and Visual Basic for Applications, which I employed to add some rocket fuel to Word and Excel. However, I thought it was time I learnt VB so I could create stand-alone programs, and also teach it in school.

The screenshot above shows one of my first applications. It was a calculator which took account of value-added tax (VAT) semi-automatically, and held running totals. I used the Running Totals to help me keep an eye on whether I was going over budget. I also added a 'Lock' feature, to prevent myself or someone else accidentally resetting it.

It worked really well. The only thing is, I am now rather embarrassed by the code. Although it was efficient, and worked, it includes lines line Sub Command8_Click(). The next program I wrote, and subsequent ones, named items properly (eg cmdVAT for the Command button to add VAT).

Still, not bad for a first attempt methinks!

Other articles featuring Visual Basic or Visual Basic for Applications:

Computational thinking and spreadsheets

How computers decrease efficiency

Welcome back, VBA!

For the full list of articles featured in our 2017 Retrospective, please visit:

2017 Retrospective: Index of featured articles