Hi Steve,
Thanks for your patience and advice - it is much appreciated.
I find it incredibly frutrating trying to get to grips with vba as all the
written
guides are for something other than ppt or ...
I have tried what you suggest but no luck - when used as a prive sub it
objects to the Me. object.
Presumably that is because I have ListBox1 on the slide and not as part of a
form??? If I leave it out then it says that ListBox1 is undefined.
So I tried putting MsgBox statements in the main subroutine within the scope
of the With's that you suggested, namely:
With ActivePresentation.Slides(iWhere).Shapes("ListBox1")
With .OLEFormat.Object
.Clear
' Add items to the list
For k = 1 To j
.AddItem (strDirList(k, 1))
Next
.Height = 80
.ForeColor = RGB(255, 0, 0)
.BackColor = RGB(0, 0, 0)
.BorderColor = RGB(0, 0, 255)
.Visible = True
MsgBox (.Text)
MsgBox (.ListIndex)
End With
End With
That works fine but displays simply "" and -1 - ie before anything is
clicked/changed in the ListBox. I cannot see how I should make it wait for
a change event. I tried preceding the MsgBox statements with a While
..ListIndex = -1 Wend
That, predicably, sends the module into an indefinite loop!
So the next question ;-)) is how do you await the change event?
cheers.
Chris