RE: Error using vba
- From: John Wilson <john AT technologytrish.co DOT uk>
- Date: Sun, 22 Nov 2009 00:30:01 -0800
If you have not renamed it the name is probably TextBox19 (no space)
I would rename to something more useful in the selection / visibility pane
though
--
john ATSIGN PPTAlchemy.co.uk
Free PPT Hints, Tips and Tutorials
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
"Wayne" wrote:
I am new at VBA and trying to use VBA in powerPoint 2007 in a vista os.
to create a quiz. I am reading a set of question into an array of
questions from a file and want to add one question at a time to a text
box. I am using the following code:
ActivePresentation.Slides(5).Shapes("TextBox
19").TextFrame.TextRange.Text = question(number)
but I have been getting the following error:
Run-time error '-2147188160 (80048240)':
Item TextBox 19 not found in the Shapes collection.
But when I check the object code using either the selection and
visibility option in powerPoint or the code from example 8 from David
Marcovitz
Public Sub GetObjectName()
If ActiveWindow.Selection.Type = ppSelectionShapes _
Or ActiveWindow.Selection.Type = ppSelectionText Then
If ActiveWindow.Selection.ShapeRange.Count = 1 Then
MsgBox (ActiveWindow.Selection.ShapeRange.Name)
Else
MsgBox ("You have selected more than one shape.")
End If
Else
MsgBox ("No shapes are selected.")
End If
End Sub
I get that the object name is TextBox 19.
Please Help
.
- Follow-Ups:
- Re: Error using vba
- From: Steve Rindsberg
- Re: Error using vba
- References:
- Error using vba
- From: Wayne
- Error using vba
- Prev by Date: Re: Problem with slide Export
- Next by Date: RE: VBA automating Word from PowerPoint
- Previous by thread: Re: Error using vba
- Next by thread: Re: Error using vba
- Index(es):
Relevant Pages
|