문제

How can I get a variable to work across slides in PowerPoint 2007?

I tried:

Rem ...

Slide54.myvar = 1

Rem ...

But it doesn't work. Is there any way to declare a "global" variable that can be accessed from all slides?

I've heard that I could use Modules, but I don't know how to set the code up.

도움이 되었습니까?

해결책

To have your variable across all slides, you need to declare it as Public or Global. You add a module to your slide and declare it as:

Public MyVar as Integer

To add a module to your slide, In the VBA editor, make sure that your presentation is highlighted in the left-hand pane. Then, choose Insert, Module from the menu bar to insert a new code module into your project. You can have your variable declarations there.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top