C
Colleyville Alan
I have two nested loops that go through a couple of arrays and place
textboxes on a slide. One array has the X & Y coordinates and the other has
the names of mutual funds. I want to put the names of the mutual funds in
the textboxes and place the textboxes at specific X/Y coordinates. If there
is only one fund in a category, this works just fine. But if there is more
than one (e.g. two Large Value funds), then the first time through the loop
I would add a text box. The next time through, I do not want to add a new
box, I want to update the box just added. The category is determined by the
3rd line (the one that refers to an Order property).
Here is the code:
For x = 1 To UBound(XYArray)
For y = 1 To UBound(FundArray)
If (FundArray(y).Order + 1) > XYArray(x).Order_Low And
(FundArray(y).Order - 1) < XYArray(x).Order_High Then ' test for Category
Set oSlide = oPres.Slides(1)
Set oShape =
oSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 426#, 72#, 132#, 78#)
With oShape
.TextFrame.TextRange.Text = FundArray(y).Fund_Name
& vbCr
End With
End If
Next y
Next x
I cannot think about how to test for the presense of the textbox. Any
ideas?
Thanks
textboxes on a slide. One array has the X & Y coordinates and the other has
the names of mutual funds. I want to put the names of the mutual funds in
the textboxes and place the textboxes at specific X/Y coordinates. If there
is only one fund in a category, this works just fine. But if there is more
than one (e.g. two Large Value funds), then the first time through the loop
I would add a text box. The next time through, I do not want to add a new
box, I want to update the box just added. The category is determined by the
3rd line (the one that refers to an Order property).
Here is the code:
For x = 1 To UBound(XYArray)
For y = 1 To UBound(FundArray)
If (FundArray(y).Order + 1) > XYArray(x).Order_Low And
(FundArray(y).Order - 1) < XYArray(x).Order_High Then ' test for Category
Set oSlide = oPres.Slides(1)
Set oShape =
oSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 426#, 72#, 132#, 78#)
With oShape
.TextFrame.TextRange.Text = FundArray(y).Fund_Name
& vbCr
End With
End If
Next y
Next x
I cannot think about how to test for the presense of the textbox. Any
ideas?
Thanks