Adapting a ready made PowerPoint quiz with VBA Pam Miller.

Post on 27-Dec-2015

223 views 0 download

Transcript of Adapting a ready made PowerPoint quiz with VBA Pam Miller.

Adapting a ready made PowerPoint quiz with VBA

Pam Miller

Adapting a ready made PowerPoint quiz with VBA 2

Security

The security must be set to Medium for the macros to work.

Check Tools, Macro, Security.

You should set it to Medium, then Save, Close, Open, Enable macros and then View.

Adapting a ready made PowerPoint quiz with VBA 3

Opening a PowerPoint quiz made with VBA

You must enable the macro for the quiz to work.

Adapting a ready made PowerPoint quiz with VBA 4

Now …

• Look at a PowerPoint quiz made with VBA• Save the ‘perfect quiz’ in read-only safe place• Consider and change the testing file• Play and adapt

Protecting the coding

Adapting a ready made PowerPoint quiz with VBA 6

Save as PPS

If you save your work as a PowerPoint Show or PPS no one can get into the VBA coding and change it.

File, Save as

Attaching a macro …

To an object

To part of an object

Adapting a ready made PowerPoint quiz with VBA 8

Attaching a macro to an object

Right click on the object. Select Action Settings, Mouse Click, Run macro, select macro.

It must be an object and not text, i.e. it must be a text box/object.

Adapting a ready made PowerPoint quiz with VBA 9

Attaching a macro to part of an object

To attach a macro to part of an object, add a small object to the small area. Do it in colour, position it, add the macro and then adjust the settings removing the fill and the border.

You could first attach a macro to the large ‘wrong’ area and then another macro for the small ‘correct’ area.

VB Editor

Getting VB Editor

Adapting a ready made PowerPoint quiz with VBA 11

Getting VB editorClick on View, Toolbars, Visual Basic. You need the Visual Basic Editor.Click on the Visual Basic EditorNow click on VBAProject, and then on Modules and then on Module 1 and the editing box appears.

Adapting a ready made PowerPoint quiz with VBA 12

Getting VB editor another way

Changing …

Macro name

Message

Input box prompt

Title for input box

Adapting a ready made PowerPoint quiz with VBA 14

Changing macro nameYou can change the macro name.

It must be one word with no spaces.

The name will change in the Run macro box.

Adapting a ready made PowerPoint quiz with VBA 15

Changing the message

You can change the message.

Type it inside the quotation marks.

Adapting a ready made PowerPoint quiz with VBA 16

Changing input box prompt

You can change the prompt. Type it inside the quotation marks.

Adapting a ready made PowerPoint quiz with VBA 17

Changing title for input box

You can change the title of the input box.

Type it inside the quotation marks.

Calculations

Done for you

Adapting a ready made PowerPoint quiz with VBA 19

Doing calculations – they have been done for you

Look at how the calculations are added and subtracted. They are based on the number of positive and negative responses.

If you do not want the quiz results do not attach the macro ‘Feedback’.

Moving forward …

Selecting the correct answer

On click

Not moving forward

Adapting a ready made PowerPoint quiz with VBA 21

Moving forward on instruction from macro

Look at the coding where you indicate viewing the Next slide.

Adapting a ready made PowerPoint quiz with VBA 22

Moving forward using action buttons

Using an action button allows you to specify which slide you wish to link to.

Adapting a ready made PowerPoint quiz with VBA 23

No moving forward at allTo prevent any meaningless moving forward using a mouse or clicking, select Slide Show, Set Up Show, Browsed at kiosk.But if you do this no animation which needs a click will work, so if you have animations make them automatic.

Displaying message

Adapting a ready made PowerPoint quiz with VBA 25

Displaying a message

An easy effective macro is to show a message. Copy the coding.

Adapting a ready made PowerPoint quiz with VBA 26

Displaying a message

Be creative

Adapting a ready made PowerPoint quiz with VBA 27

Be creative

Be creative