• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Microsoft Excel Tips and Tricks - Computergaga

  • Home
  • Excel Online Courses
  • Excel Functions List
  • Free Downloads
  • Blog
  • Tutorials
  • About
Home / VBA / Create a Hangman Game in Excel

Create a Hangman Game in Excel

I created a hangman game using Excel VBA for fun, and thought I would post it here for all budding Excel VBA learners to look at.

I find creating games, quizzes and sports spreadsheets an enjoyable way of keeping my Excel skills fresh, and to develop them further.

The game asks you to guess a letter to complete the phrase. A hint is provided for a little help, and the phrase will be related to music, sports, people, film or geography.

The spreadsheet is unprotected so you can check out the code and play around it with it further.

The VBA used to create this hangman game includes;

  • Dynamic arrays.
  • Creating a userform.
  • Module scoped variables.
  • Lots of text work including functions such as Left and StrConv.
  • Lots of For Loops, IF statements and a Select Case statement.

Download the Excel Hangman game

I also have a special Christmas version of my Hangman game in Excel to download.

Hangman game in Excel

In modern version of Excels, when downloading macro enabled spreadsheets, you will often need to unblock the files to allow the macros to run.

Do this by;

  • Locate the Excel file on your computer (probably the Downloads folder).
  • Right-click on the file and click Properties.
  • Check the Unblock box and click OK.

Let me now how you do? I want to see some high scores ?

Want to improve your Excel VBA skills? All the techniques used to create this hangman game are covered in our Excel VBA course.

Related Posts:

  • Case sensitive XLOOKUP feature
    Case Sensitive Lookup with XLOOKUP in Excel
  • Calculate age in Excel thumbnail
    How to Calculate Age in Excel
  • Moving average in Excel thumbnail
    Moving Average in Excel
  • Live currency exchange rate in Excel thumbnail
    LIVE Currency Exchange Rate in Excel

Reader Interactions

Comments

  1. Avril says

    24 June 2014 at 11:07 am

    Hi,
    I downloaded the game but where are the questions?
    Thanks.

    Reply
    • Avril says

      24 June 2014 at 11:17 am

      Never mind, I found it.
      ps. it hurts my brain looking at your codes how does one learn this stuff in the first place O_O

      Reply
      • computergaga_blog says

        25 June 2014 at 5:22 am

        Using our online Excel VBA course 🙂
        Really it is a case of watching tutorials, reading articles and then getting stuck in and practising.

        Reply
  2. Mr Ian Humphreys says

    20 June 2020 at 4:59 pm

    Download link takes me to a Error 404

    Reply
    • Alan Murray says

      20 June 2020 at 8:49 pm

      This has now been fixed, Ian.

      Reply
  3. Beepee says

    23 February 2023 at 1:27 pm

    Hi.
    Downloaded fine and had a game – however the hanged man image does not erase on clicking New Game button. Only the head is made invisible!
    A small change to the Select case routine:
    Place all of the Case: 6 code in the last position and the right leg is made visible before ending the game.

    Reply
    • Alan Murray says

      27 March 2023 at 12:03 pm

      I’ll check this out. It is a very old application, about 10 years, so I don’t recall the code that was used.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Recent Posts

  • Excel SWITCH Function – Nested IF Function Alternative
  • Sum Formulas Only in Excel
  • How to Calculate Age in Excel
  • Custom Sort in Excel
  • Case Sensitive Lookup with XLOOKUP in Excel
Advanced Excel Success book

Footer

Contact

[email protected]

LinkedIn Twitter YouTube

Useful Links

  • Home
  • Excel Online Courses
  • Tutorials
  • Sitemap
  • Privacy Policy
  • Jobs by Jooble

Course Topics

  • Blog
  • Charts
  • Courses
  • Dashboards
  • Downloads
  • Excel Tips
  • Formulas
  • Mail Merge
  • Office
  • PivotTables
  • Power BI
  • Power Pivot
  • Power Query
  • VBA

Join Our Mailing List

© Copyright 2009 Computergaga · All Rights Reserved ·