Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Build macro to draw lines between multiple points
I would like utlize the standard excel spreadsheet to represent a location grid in a machine shop for example. I would then like to be able to define movement of a product by specifying two differnet locations on the spreadhseet and then use a macro to draw all the lines between those points. See below
Grid - Use standard Excel as Templat A B C D.. 1 2 3 4 ... Points of Intersectio Origination: Destination A10 B C7 D1 Macro Draw line between points of intersection on a chart |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Build macro to draw lines between multiple points
Something like
Dim nStart1 As Double, nStart2 As Double Dim nEnd1 As Double, nEnd2 As Double Dim rng1 As Range Dim rng2 As Range Set rng1 = Range("A10") Set rng2 = Range("B6") nStart1 = rng1.Left + rng1.Width nStart2 = rng1.Top nEnd1 = rng2.Left + rng2.Width nEnd2 = rng2.Top ActiveSheet.Shapes.AddLine(nStart1, nStart2, nEnd1, nEnd2).Select -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Angie" wrote in message ... I would like utlize the standard excel spreadsheet to represent a location grid in a machine shop for example. I would then like to be able to define movement of a product by specifying two differnet locations on the spreadhseet and then use a macro to draw all the lines between those points. See below Grid - Use standard Excel as Template A B C D... 1 2 3 4 ... Points of Intersection Origination: Destination: A10 B6 C7 D15 Macro: Draw line between points of intersection on a chart. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to draw trend lines through only certain data points | Charts and Charting in Excel | |||
VBA to draw lines of SPC | Charts and Charting in Excel | |||
How to Draw a chart line connecting 2 points in the middle of the series | Charts and Charting in Excel | |||
Draw line between two points using data on the spreedsheet | Excel Discussion (Misc queries) | |||
How to build build a macro that automatically imports | Excel Programming |