ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Why doesn't this work in Excel 2007? Is this a bug? (https://www.excelbanter.com/excel-programming/386648-why-doesnt-work-excel-2007-bug.html)

Phil

Why doesn't this work in Excel 2007? Is this a bug?
 
The code below is supposed to add a WordArt diamond symbol and color
it red. This works perfectly in Excel 2003, but not in 2007. What
happens in 2007 is that the back color changes to red instead of the
fore color. Is this a bug? Any ideas?

yoffset = 15
xoffset = 184
top = 43
red = 10
Call AddDiamondSymbol(xoffset, top + yoffset, 7, 7, ChrW(&H2666), red)

Function AddDiamondSymbol(left, top, height, width, tier, fillcolor)
ActiveSheet.Shapes.AddTextEffect(PresetTextEffect: =0, _
Text:=tier, FontName:="Arial Black", FontSize:=20, _
FontBold:=False, FontItalic:=False, left:=left,
top:=top).Select
With Selection.ShapeRange
.Fill.Visible = True
.Fill.Solid
.Fill.ForeColor.SchemeColor = fillcolor
.Fill.Transparency = 0
End With
End Function


Peter[_61_]

Why doesn't this work in Excel 2007? Is this a bug?
 
On 2 Apr, 02:38, "Phil" wrote:
Nevermind. Instead of banging my head on this one I decided to scrap
this approach and I implemented something different.


Good thinking Phil



All times are GMT +1. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com