O
ojv
m adding a number of shapes to a chart sheet using the using the the
Shape.Height property for relative positioning. The code I use work well with
Excel 2003 but fail utterly in Excel 2007 - always returning zero for height.
The shapes then appear on top of each other giving a rather cluttered
appearance. Any aid to why the height property returns zero in Excel 2007
would be greatly appreciated. Code snippet:
nextTop = 5
left = 5
For i = LBound(projectInfo, 2) To UBound(projectInfo, 2)
nextTop = nextTop + sh.height + 5
Set sh = chForStore.Shapes.AddTextbox(msoTextOrientationHorizontal,
left, nextTop, 0#, 0#)
Set sh = chForStore.Shapes(chForStore.Shapes.count)
With sh
.Select
Selection.AutoScaleFont = False
.TextFrame.Characters.Text = projectInfo(0, i) & " " &
projectInfo(1, i)
.TextFrame.Characters.Font.size = 10
.TextFrame.AutoSize = msoTrue
.Placement = xlFreeFloating
End With
Next
Shape.Height property for relative positioning. The code I use work well with
Excel 2003 but fail utterly in Excel 2007 - always returning zero for height.
The shapes then appear on top of each other giving a rather cluttered
appearance. Any aid to why the height property returns zero in Excel 2007
would be greatly appreciated. Code snippet:
nextTop = 5
left = 5
For i = LBound(projectInfo, 2) To UBound(projectInfo, 2)
nextTop = nextTop + sh.height + 5
Set sh = chForStore.Shapes.AddTextbox(msoTextOrientationHorizontal,
left, nextTop, 0#, 0#)
Set sh = chForStore.Shapes(chForStore.Shapes.count)
With sh
.Select
Selection.AutoScaleFont = False
.TextFrame.Characters.Text = projectInfo(0, i) & " " &
projectInfo(1, i)
.TextFrame.Characters.Font.size = 10
.TextFrame.AutoSize = msoTrue
.Placement = xlFreeFloating
End With
Next