• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Draw Lines and change colors

Troy73

New Member
Can someone help me figure out how to change the color of my lines for each line? Also, the last variable that I have "BackTopY_No_Touch" is just so the drawing doesn't fill, it would be amazing if you could include how to not fill the object once it is complete.

Sub DrawFreeform()
Call DeleteShapes
Dim ws As Worksheet, fb As FreeformBuilder
Set ws = ActiveSheet
BackBottomY = 300
FrontBottomY = 350
FrontTopY = 100
BackTopY = 50
BackTopX = 50
BackBottomX = 50
FrontBottomX = 150
FrontTopX = 150
BackTopY_No_Touch = 51
Set fb = ws.Shapes.BuildFreeform(msoEditingAuto, 50, 50)
fb.AddNodes msoSegmentLine, msoEditingAuto, BackBottomX, BackBottomY
fb.AddNodes msoSegmentLine, msoEditingAuto, FrontBottomX, FrontBottomY
fb.AddNodes msoSegmentLine, msoEditingAuto, FrontTopX, FrontTopY
fb.AddNodes msoSegmentLine, msoEditingAuto, BackTopX, BackTopY_No_Touch
fb.ConvertToShape
End Sub

Edit / DeleteEdit Post Quick reply to this messageReply Reply With QuoteReply With Quote Multi-Quote This Message
 
Back
Top