Powerpoint/VBA mockup of software

N

Nada Effinway

While trying to use PowerPoint to demonstrate what we would do in some
software, I see my VBA is very rusty--or maybe PowerPoint is different?

On a slide (not using a form), I am successful in creating Comboboxes and
loading them with values, giving the appearance of a form. I can
successfully capture the user's selections.

I planned on retaining the user's selections into Public variables that I
expected to use in macros in later slides. Specifically, on one slide the
user would select an entry in the combobox and in following slides I
planned to load the same value into a similar combobox and take other
actions in that slide based on those values passed from the earlier slide.

I am not allowed to reference the Public variables from the first slide in
a Sub in the second slide.

I would appreciate helpful suggestions about what I may be overlooking.
Thanks,
Warren
 
S

Steve Rindsberg

While trying to use PowerPoint to demonstrate what we would do in some
software, I see my VBA is very rusty--or maybe PowerPoint is different?

On a slide (not using a form), I am successful in creating Comboboxes and
loading them with values, giving the appearance of a form. I can
successfully capture the user's selections.

I planned on retaining the user's selections into Public variables that I
expected to use in macros in later slides. Specifically, on one slide the
user would select an entry in the combobox and in following slides I
planned to load the same value into a similar combobox and take other
actions in that slide based on those values passed from the earlier slide.

I am not allowed to reference the Public variables from the first slide in
a Sub in the second slide.

Two approaches:

- Add a module and Dim your public variables there instead of in the code
behind the individual controls on slides.

- Since the controls should retain their values until changed by you or the
user, reference them directly. To work with the combo box named ComboName on
slide 1, for example:

With ActivePresentation.Slides(1).Shapes("ComboName").OLEFormat
' do what you need to do here
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top