Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Two-Color Gradient Fill?

I've discovered the gradient fill for shapes, which I really like. But
it always seems to use black for the shading and a VBA statement such
as Fill OneColorGradient. Evidently the RGB colors are used for the
forecolor, but the back color is black for the shading. Is there a way
to use a TwoColorGradient, using the back RGB colors for the shading?
TIA, James

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Two-Color Gradient Fill?

Sub ABC()
Set myDocument = Worksheets(2)
With myDocument.Shapes.AddShape(msoShapeRectangle, _
90, 90, 90, 50).Fill
.ForeColor.RGB = RGB(239, 250, 130)
.BackColor.RGB = RGB(226, 154, 212)
.TwoColorGradient msoGradientHorizontal, 1
End With
End Sub

--
Regards,
Tom Ogilvy


"Zone" wrote:

I've discovered the gradient fill for shapes, which I really like. But
it always seems to use black for the shading and a VBA statement such
as Fill OneColorGradient. Evidently the RGB colors are used for the
forecolor, but the back color is black for the shading. Is there a way
to use a TwoColorGradient, using the back RGB colors for the shading?
TIA, James


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Two-Color Gradient Fill?

Sheesh, that was easy. Thanks, Tom.
Tom Ogilvy wrote:
Sub ABC()
Set myDocument = Worksheets(2)
With myDocument.Shapes.AddShape(msoShapeRectangle, _
90, 90, 90, 50).Fill
.ForeColor.RGB = RGB(239, 250, 130)
.BackColor.RGB = RGB(226, 154, 212)
.TwoColorGradient msoGradientHorizontal, 1
End With
End Sub

--
Regards,
Tom Ogilvy


"Zone" wrote:

I've discovered the gradient fill for shapes, which I really like. But
it always seems to use black for the shading and a VBA statement such
as Fill OneColorGradient. Evidently the RGB colors are used for the
forecolor, but the back color is black for the shading. Is there a way
to use a TwoColorGradient, using the back RGB colors for the shading?
TIA, James



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Two-Color Gradient Fill?

Perfect info on this macro. Now if I can just get the color directional
correct. :)

"Zone" wrote:

Sheesh, that was easy. Thanks, Tom.
Tom Ogilvy wrote:
Sub ABC()
Set myDocument = Worksheets(2)
With myDocument.Shapes.AddShape(msoShapeRectangle, _
90, 90, 90, 50).Fill
.ForeColor.RGB = RGB(239, 250, 130)
.BackColor.RGB = RGB(226, 154, 212)
.TwoColorGradient msoGradientHorizontal, 1
End With
End Sub

--
Regards,
Tom Ogilvy


"Zone" wrote:

I've discovered the gradient fill for shapes, which I really like. But
it always seems to use black for the shading and a VBA statement such
as Fill OneColorGradient. Evidently the RGB colors are used for the
forecolor, but the back color is black for the shading. Is there a way
to use a TwoColorGradient, using the back RGB colors for the shading?
TIA, James




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Color gradient problem on X-Y chart PaulPW Charts and Charting in Excel 2 May 21st 10 04:07 PM
How do I select two colors for Gradient Fill Excel 2007 Hennie[_2_] Charts and Charting in Excel 1 August 14th 09 09:15 AM
Charts - Gradient fill Plot Area in Excel 2007 Geoff Budd Charts and Charting in Excel 4 February 4th 09 05:44 PM
How do I turn off gradient fill for data bars in condit. formattin Matt Excel Discussion (Misc queries) 0 August 27th 08 01:11 AM
Fixed color gradient Hammer_757 Charts and Charting in Excel 2 April 17th 06 07:49 PM


All times are GMT +1. The time now is 10:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"