Powerful PowerPoint for Educators: Using Visual Basic for Applications to Make PowerPoint Interactive


Download 1.37 Mb.
Pdf ko'rish
bet65/191
Sana08.05.2023
Hajmi1.37 Mb.
#1442581
1   ...   61   62   63   64   65   66   67   68   ...   191
Bog'liq
2.2. Powerful PowerPoint For Educators

Ini 
tial 
ize
to do
this (you could call it any thing you want, like
House 
keeper
,
Maid
, or 
Mom
).
Let’s imagine that you have two slides (slides 2 and 3) that will show stars when
the correct an swer is chosen. If the stars are the fourth ob ject on the slides, your
Ini 
tial 
ize
pro cedure might look something like this:
Sub Ini 
tial 
ize()
ActivePresentation.Slides(2).Shapes(4).Vis 
ible = False
ActivePresentation.Slides(3).Shapes(4).Vis 
ible = False
End Sub
You could add something to this pro cedure to move to the next slide, or you 
can do all your initializing from this pro cedure and have another procedure take
care of other stuff. So let’s add a 
GetStarted
pro cedure to do the other stuff as
well as call the procedure
Ini 
tial 
ize
.
Sub GetStarted()
Ini 
tialize 'Hide the stars
YourName 'Ask for the name
ActivePresentation.SlideShowWindow.View.Next 'Go to the next slide
End Sub
This procedure will be linked to the but ton on the title slide. As the comments in -
dicate, it will use the
Ini 
tial 
ize
pro cedure to hide the stars, it will use the
YourName
procedure to ask for a name, and it will use
ActivePresentation.SlideShowWindow.View.Next
to go to the next
slide. As al ways, because this procedure calls the
YourName
pro cedure and the
Ini 
tial 
ize
pro cedure, these pro cedures must be in cluded in your module
along with the dec laration (

Download 1.37 Mb.

Do'stlaringiz bilan baham:
1   ...   61   62   63   64   65   66   67   68   ...   191




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling