rational_icthus
New Member
- Joined
- Mar 18, 2010
- Messages
- 1
Hi,
I'm using Excel 2007, and I'm looking to apply a radial gradient to a Shape object via the TwoColorGradient method. Unfortunately, it doesn't appear that the MsoGradientStyle enum has an option for a radial gradient. Here's the code I'm using:
The 'msoGradientFromCenter' is the closest I've gotten to a true radial gradient, but it's not really radial. The macro recorder is useless for testing on shapes, so I'm really at a standstill.
Can anyone help?
I'm using Excel 2007, and I'm looking to apply a radial gradient to a Shape object via the TwoColorGradient method. Unfortunately, it doesn't appear that the MsoGradientStyle enum has an option for a radial gradient. Here's the code I'm using:
Code:
Set shp = Sheet1.AddShape(msoShapeOval, 100, 100, 25, 25)
shp.Fill.TwoColorGradient msoGradientFromCenter, 1
shp.Fill.GradientStops(1).Color.rgb = rgb(0, 0, 0)
shp.Fill.GradientStops(2).Color.rgb = rgb(255, 0, 0)
The 'msoGradientFromCenter' is the closest I've gotten to a true radial gradient, but it's not really radial. The macro recorder is useless for testing on shapes, so I'm really at a standstill.
Can anyone help?