次の方法で共有


Experienced Challenge 3: Are You Smarter Than a PowerPoint Developer?

Office Programs Required

Microsoft PowerPoint 2007

Goldfish Awarded

5

Deadline for Submission

Friday, April 24, 2009 (8:00 AM Pacific Daylight Time)

Files Required

Experienced_challenge_3.pptm in the OfficePalooza Challenge Pack.

Quick, which of the following is not one of the Marx Brothers:

· Chico

· Gummo

· Lando

· Zeppo

Don’t know? Uh-oh; you’re going to have trouble with Challenge 3, aren’t you?

Oh, wait: no you aren’t. After all, you don’t have to know the answer to this question; all you have to do is know how to create a PowerPoint quiz that asks other people if they know the answer to the question. That’s way easier, right?

At any rate, here’s the inside scoop on what you need to do to successfully complete Are You Smarter Than a PowerPoint Developer? For starters, you need to extract the file Experienced_challenge_3.pptm from the OfficePalooza Challenge Pack . That file looks something like this:

Experienced Challenge 3 

As you can see, this is a single-slide presentation. On this single slide we see a text box at the top and a button (labeled Start the Quiz) at the bottom. In between are a few things you don’t see: four radio buttons which represent the four choices in our multiple-choice quiz.

Note. How can you make those four buttons visible? Here’s a hint: start the presentation in Slide Show mode, click the Start the Quiz button, and then exit the slide show.

Now, here’s what you need to do. For starters, you need to right-click the Start the Quiz button and then click View Code; that will bring up the Visual Basic Editor and a subroutine that currently looks like this:

Private Sub CommandButton1_Click()

OptionButton1.Visible = True

OptionButton2.Visible = True

OptionButton3.Visible = True

OptionButton4.Visible = True

End Sub

Is that enough code to solve Challenge 3? Nope. In order to get credit for this challenge you’re going to need to write some Visual Basic for Applications (VBA) code of your own.

In particular, you need to add code so that the first time the Start the Quiz button is clicked the text in the text box is replaced with the following question:

Which of the following is not one of the Marx Brothers?

You then need to replace the option button captions with, in order, these names:

· Chico

· Gummo

· Lando

· Zeppo

Finally, you need to change the caption of the Start the Quiz button to this: Continue.

Whew!

Oh, but wait: you aren’t done yet. Now the user needs to select the correct answer (in case you’re wondering, Lando is the correct answer) and then click Continue. When that happens your subroutine needs to determine which answer was selected, then report back the result (i.e., by displaying a message box that reports whether the answer was correct or not).

And that’s all you have to do. Originally we were going to make you add another question or two to the quiz, but we decided to go a little easy on you. Don’t bother to thank us; that’s just what we do.

Note. Ideally you’ll be able to solve this challenge simply by modifying the code for the Start the Quiz button. If that doesn’t work and you need to use another subroutine or, say, declare some variables that’s fine; in that case, just be sure you send us all the code you write and not just the code attached to Start the Quiz.

Submitting Your Entry

The OfficePalooza sweepstakes is over, but you’re welcome to try the challenges and learn on your own. Good luck!