+ Reply to Thread
Results 1 to 11 of 11

Creating hangman(word game) on MS Excel

  1. #1
    Registered User
    Join Date
    12-11-2005
    Posts
    2

    Creating hangman(word game) on MS Excel

    can any one plz help me create hangman word game on MS Excel???
    thanking you
    nauman

  2. #2
    Forum Contributor
    Join Date
    11-11-2005
    Posts
    267
    go to:

    http://www.j-walk.com/ss/excel/files/general.htm

  3. #3
    RB Smissaert
    Guest

    Re: Creating hangman(word game) on MS Excel

    There is an example of this on John Walkenbach's site:
    http://j-walk.com/ss/excel/files/general.htm
    at the bottom of the file list.

    RBS


    "nauman612" <[email protected]> wrote
    in message news:[email protected]...
    >
    > can any one plz help me create hangman word game on MS Excel???
    > thanking you
    > nauman
    >
    >
    > --
    > nauman612
    > ------------------------------------------------------------------------
    > nauman612's Profile:
    > http://www.excelforum.com/member.php...o&userid=29548
    > View this thread: http://www.excelforum.com/showthread...hreadid=492519
    >



  4. #4
    Norman Jones
    Guest

    Re: Creating hangman(word game) on MS Excel

    Hi Nauman6,

    See John Walkenbach's PUP addin:

    http://j-walk.com/ss/pup/pup6/features.htm


    ---
    Regards,
    Norman



    "nauman612" <[email protected]> wrote
    in message news:[email protected]...
    >
    > can any one plz help me create hangman word game on MS Excel???
    > thanking you
    > nauman
    >
    >
    > --
    > nauman612
    > ------------------------------------------------------------------------
    > nauman612's Profile:
    > http://www.excelforum.com/member.php...o&userid=29548
    > View this thread: http://www.excelforum.com/showthread...hreadid=492519
    >




  5. #5
    John Coleman
    Guest

    Re: Creating hangman(word game) on MS Excel


    nauman612 wrote:
    > can any one plz help me create hangman word game on MS Excel???
    > thanking you
    > nauman
    >
    >
    > --
    > nauman612
    > ------------------------------------------------------------------------
    > nauman612's Profile: http://www.excelforum.com/member.php...o&userid=29548
    > View this thread: http://www.excelforum.com/showthread...hreadid=492519


    If all you want is a working copy of Hangman to run in Excel, then by
    all means go to Walkenbach's site. It you want to make your own program
    (I certainly would - the only way to learn anything is to reinvent lots
    of wheels), here are a few suggestions:

    1) Learn VBA (a silly suggestion, but your post does not indicate how
    much VBA you know. A hangman program isn't all that hard, but it isn't
    trivial either, so isn't a good first program. *If* you are beginner in
    VBA I would recommend shelving the idea until you have plowed through a
    book.) This suggestion is relevant if the following suggestions seem
    completely obscure.

    2) The main sheet (that the user would see) could be formatted so that
    every other column has a narrow width. You would need to write a macro
    to do this. Turn off gridlines and row/column labels at the end. The
    cells which are to hold the word could be underlined. The point of the
    narrow columns is to introduce spaces between the underlined cells.
    Your main hangman program would need to start by initializing the main
    sheet - clearing any previous data and underlining the right number of
    cells to indicate how many letters the user needs to guess.

    3) Draw the gallows and completely hanged main on the main sheet.
    Change the name of each shape that you want to appear to (say)
    "hangman1", "hangman2", etc, with the numbers indicating the order you
    want them to appear. Change the visibility of each of these shapes to
    false. Then, your main program might have something like this:

    If CorrectGuess = False Then
    NumWrong = NumWrong + 1
    Sheets(1).Shapes("hangman" & NumWrong).Visible = True
    If NumWrong > MaxNumWrong Then
    MsgBox "Sorry, you lose!"
    Done = True
    End If
    End If

    4) Store the actual words say in Column A of a sheet called "words",
    with maybe the number of words stored in B1. For testing purposes you
    could just write a couple of dozen. Afterwards, you could look into
    writing a macro that would take a text file consisting of thousands of
    words (say a listing of the 1000 most common words in English - surely
    google can find such a thing) and write them into the worksheet. If you
    are lucky, you may not even need to write a macro if Excel itself can
    import the data. The your main code would have something like

    NumWords = Sheets("words").Range("B1").Value
    i = Int(NumWords * Rnd())
    Word = Range(Sheets("words").Range("A1").Offset(i).Value

    5) The main loop (maybe a Do Until Done loop) could consist of using an
    inputbox to ask the user for a guess. Using InStr() to check if the
    guessed letter occurs in the word then acting accordingly: if a correct
    guess then making that letter visible and incrementing a variable
    CorrectGuesses and comparing it to the length of the word to see if
    they have won; if a wrong guess then displaying the incorrect guess in
    the spreadsheet and making another shape visible (see above).

    Hope that helps. If you decide to go that route, don't hesitate to ask
    more questions if you get stuck at specific things (like how do you
    change the name of a shape or use InStr()).

    -John Coleman


  6. #6
    Norman Jones
    Guest

    Re: Creating hangman(word game) on MS Excel

    Hi John,

    > If all you want is a working copy of Hangman to run in Excel, then by
    > all means go to Walkenbach's site


    John Walkenbach's download also provides access to highly instructive code.

    > the only way to learn anything is to reinvent lots of wheels


    This statement may represent your view, but strikes me as rather too
    sweeping in ambit.


    Regards,
    Norman


    "John Coleman" <[email protected]> wrote in message
    news:[email protected]...
    >
    > nauman612 wrote:
    >> can any one plz help me create hangman word game on MS Excel???
    >> thanking you
    >> nauman
    >>
    >>
    >> --
    >> nauman612
    >> ------------------------------------------------------------------------
    >> nauman612's Profile:
    >> http://www.excelforum.com/member.php...o&userid=29548
    >> View this thread:
    >> http://www.excelforum.com/showthread...hreadid=492519

    >
    > If all you want is a working copy of Hangman to run in Excel, then by
    > all means go to Walkenbach's site. It you want to make your own program
    > (I certainly would - the only way to learn anything is to reinvent lots
    > of wheels), here are a few suggestions:
    >
    > 1) Learn VBA (a silly suggestion, but your post does not indicate how
    > much VBA you know. A hangman program isn't all that hard, but it isn't
    > trivial either, so isn't a good first program. *If* you are beginner in
    > VBA I would recommend shelving the idea until you have plowed through a
    > book.) This suggestion is relevant if the following suggestions seem
    > completely obscure.
    >
    > 2) The main sheet (that the user would see) could be formatted so that
    > every other column has a narrow width. You would need to write a macro
    > to do this. Turn off gridlines and row/column labels at the end. The
    > cells which are to hold the word could be underlined. The point of the
    > narrow columns is to introduce spaces between the underlined cells.
    > Your main hangman program would need to start by initializing the main
    > sheet - clearing any previous data and underlining the right number of
    > cells to indicate how many letters the user needs to guess.
    >
    > 3) Draw the gallows and completely hanged main on the main sheet.
    > Change the name of each shape that you want to appear to (say)
    > "hangman1", "hangman2", etc, with the numbers indicating the order you
    > want them to appear. Change the visibility of each of these shapes to
    > false. Then, your main program might have something like this:
    >
    > If CorrectGuess = False Then
    > NumWrong = NumWrong + 1
    > Sheets(1).Shapes("hangman" & NumWrong).Visible = True
    > If NumWrong > MaxNumWrong Then
    > MsgBox "Sorry, you lose!"
    > Done = True
    > End If
    > End If
    >
    > 4) Store the actual words say in Column A of a sheet called "words",
    > with maybe the number of words stored in B1. For testing purposes you
    > could just write a couple of dozen. Afterwards, you could look into
    > writing a macro that would take a text file consisting of thousands of
    > words (say a listing of the 1000 most common words in English - surely
    > google can find such a thing) and write them into the worksheet. If you
    > are lucky, you may not even need to write a macro if Excel itself can
    > import the data. The your main code would have something like
    >
    > NumWords = Sheets("words").Range("B1").Value
    > i = Int(NumWords * Rnd())
    > Word = Range(Sheets("words").Range("A1").Offset(i).Value
    >
    > 5) The main loop (maybe a Do Until Done loop) could consist of using an
    > inputbox to ask the user for a guess. Using InStr() to check if the
    > guessed letter occurs in the word then acting accordingly: if a correct
    > guess then making that letter visible and incrementing a variable
    > CorrectGuesses and comparing it to the length of the word to see if
    > they have won; if a wrong guess then displaying the incorrect guess in
    > the spreadsheet and making another shape visible (see above).
    >
    > Hope that helps. If you decide to go that route, don't hesitate to ask
    > more questions if you get stuck at specific things (like how do you
    > change the name of a shape or use InStr()).
    >
    > -John Coleman
    >




  7. #7
    John Coleman
    Guest

    Re: Creating hangman(word game) on MS Excel


    Norman Jones wrote:
    > Hi John,
    >
    > > If all you want is a working copy of Hangman to run in Excel, then by
    > > all means go to Walkenbach's site

    >
    > John Walkenbach's download also provides access to highly instructive code.
    >
    > > the only way to learn anything is to reinvent lots of wheels

    >
    > This statement may represent your view, but strikes me as rather too
    > sweeping in ambit.
    >


    I didn't say all wheels - just lots of wheels. Hangman in particular
    strikes me as a perfect learning opportunity: moderately challenging
    without being discouragingly hard and you get something *cool* for your
    effort.

    -John


  8. #8
    John Coleman
    Guest

    Re: Creating hangman(word game) on MS Excel


    Norman Jones wrote:

    (snip)

    > John Walkenbach's download also provides access to highly instructive code.


    (snip)

    I definitely concur with that. Much of what I know about VBA I learned
    from his books, and have found his website useful and entertaining as
    well.

    -John Coleman


  9. #9
    Forum Contributor
    Join Date
    11-11-2005
    Posts
    267
    While on the subject of games and the Hangman, one of the surest way of exercising your programming muscle (in EXCEL) is to turn your hand to developing games - word games are a good starting point - and it is best to hatch your own original design. I have particularly learnt a great deal manipulating userforms in this fashion. The challenges that are confronted make good study fare and the spin-offs into mainstream applications are enormous. So within the confines, if limited, of Excel's functionality for games there is a healthy potential to fast-track the mastery of VBA - to a certain degree.


    Myles.

  10. #10
    Registered User
    Join Date
    10-04-2012
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Creating hangman(word game) on MS Excel

    Hi buddy
    I was looking for something similar, yesterday I could...it's a nice idea..put in google "excelminiapps blog" (excelminiapps.blogspot) , you know..the problem is it's in spanish...
    good luck


    Quote Originally Posted by nauman612 View Post
    can any one plz help me create hangman word game on MS Excel???
    thanking you
    nauman

  11. #11
    Registered User
    Join Date
    04-04-2014
    Location
    Cambodia
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Creating hangman(word game) on MS Excel

    2 years ago, I created a Hangman Game in Excel. It is purely excel and you do not need to know VBA or any other compliment programme.

    Drop me an email with the subject "Request Hangman Game in Excel". I will send you a copy of mine. My mail is [email protected]

    Good luck

    Rasmey

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1