M
Mr.ChrisKelley
I'm using powerpoint to prototype for a HCI class and am having
difficulties working with combo boxes. I've been working on this
problem for days and the internet doesn't provide many resources for
using VBA in powerpoint (not that I could find anyway). The problems
I'm having is I want to have a couple of combo boxes populate when
the presentation begins. One is on the master slide and one on a
regular slide. The problem I'm running into is I'm not sure if these
commands go into the module code, class code, or slide code. I've
tried using some various code from pptfaq.com and a few other sites
but haven't found anything to work. I am also having difficulties
defining the presentation in the module and then initiating a new
class. Any help or links to websites that can provide a beginners
guide to VBA would be greatly appreciated. I am familiar with VB, but
that only gets you so far in VBA.
I've tried the following code (among others):
Public WithEvents PPTEvent As Application
Dim myobject As New Class1
Sub StartEvents()
Set myobject.appevent = Application
End Sub
Sub StopEvents()
Set myobject.appevent = Nothing
End Sub
Sub AddItemsToSelectedListBox()
Dim oShape As Shape
Set oShape = ActiveWindow.Selection.ShapeRange(1)
With oShape.OLEFormat.Object
' Add items to the list
.AddItem ("This")
.AddItem ("That")
.AddItem ("The Other")
End With
End Sub
Thanks for the help.
CMK
difficulties working with combo boxes. I've been working on this
problem for days and the internet doesn't provide many resources for
using VBA in powerpoint (not that I could find anyway). The problems
I'm having is I want to have a couple of combo boxes populate when
the presentation begins. One is on the master slide and one on a
regular slide. The problem I'm running into is I'm not sure if these
commands go into the module code, class code, or slide code. I've
tried using some various code from pptfaq.com and a few other sites
but haven't found anything to work. I am also having difficulties
defining the presentation in the module and then initiating a new
class. Any help or links to websites that can provide a beginners
guide to VBA would be greatly appreciated. I am familiar with VB, but
that only gets you so far in VBA.
I've tried the following code (among others):
Public WithEvents PPTEvent As Application
Dim myobject As New Class1
Sub StartEvents()
Set myobject.appevent = Application
End Sub
Sub StopEvents()
Set myobject.appevent = Nothing
End Sub
Sub AddItemsToSelectedListBox()
Dim oShape As Shape
Set oShape = ActiveWindow.Selection.ShapeRange(1)
With oShape.OLEFormat.Object
' Add items to the list
.AddItem ("This")
.AddItem ("That")
.AddItem ("The Other")
End With
End Sub
Thanks for the help.
CMK