Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50158

Macro to create lines that connect cells

$
0
0
I would like to create a macro that inserts vectors from the bottom of one cell to the top of another.

I have found the below approach but it does not seem to work. can someone help me please?

Sub insert_lines()

start_x = 0
start_y = 0
end_x = 10
end_y = 10

Line = Sheet1.Shapes.AddLine(start_x, start_y, end_x, end_y)
Line.Line.EndArrowheadStyle = MsoArrowheadStyle.msoArrowheadTriangle


End Sub

Viewing all articles
Browse latest Browse all 50158

Trending Articles