LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Fill Area Between Lines

Thanks, Jim and Peter. Your ideas look promising. I especially like
Peter's rectangle with the fat borders. I didn't know the border could
be so thick. Jim, your 4-rectangle solution is pretty much what I'm
doing. It's workable, but ends up with 8 rectangles by the time I
create the wall around it. Anyway, I'll study these ideas and see if I
can adapt one or more of them. Again, many thanks! James

Jim Cone wrote:
James,
"Any more ideas?"

I like Peter T's suggestion of adjusting the border width...

Sub JustOneWillDoIt()
With ActiveSheet.Shapes.AddShape(msoShapeRectangle, 99, 132, 99, 99)
.Line.Weight = 40
.Fill.Visible = msoFalse
End With
End Sub
'-----------

However if the size of the filled portions are not a constant then perhaps
instead of inserting one rectangle, insert 4 rectangles to make up
the fill area. The rectangle's borders do not have to show, so the 4 graphics
could even overlap. Something like this? ...
'-------------------
Sub UseMultipleRetangles()
Dim shpOne As Excel.Shape
Dim shpTwo As Excel.Shape

' vertical left ' left, top, width, height
With ActiveSheet.Shapes.AddShape(msoShapeRectangle, 69.75, 132, 50.25, 258)
'vertical right
Set shpOne = .Duplicate
shpOne.Left = .Left + .Width + 279
shpOne.Top = .Top
End With
' horizontal top
With ActiveSheet.Shapes.AddShape(msoShapeRectangle, 120, shpOne.Top, 279, 45)
'horizontal bottom
Set shpTwo = .Duplicate
shpTwo.Left = .Left
shpTwo.Top = shpOne.Top + shpOne.Height - .Height
' .Line.Visible = msoFalse
End With
End Sub
-----------
Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html




 
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
How to fill the area between two lines in excel graph? dypw2007 Charts and Charting in Excel 2 April 3rd 23 07:28 PM
Radar chart with Area and Lines CrownEquip-Jen Charts and Charting in Excel 1 November 13th 09 03:14 PM
How to fill the area between lines in graph DExcel Charts and Charting in Excel 2 July 22nd 09 08:05 PM
Area between two lines in a chart Tulane chic New Users to Excel 1 June 13th 06 03:45 PM
Grid Lines on an Area Chart Phil Hageman Charts and Charting in Excel 1 September 21st 05 11:53 PM


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

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

About Us

"It's about Microsoft Excel"