'Draw ' a line

  • Thread starter Thread starter Linda
  • Start date Start date
Linda,

Display the Drawing toolbar and choose the Line tool, and draw
the line directly on the worksheet. If you want a VBA solution,
use code like the following:

Dim WS As Worksheet
Set WS = ActiveSheet
WS.Shapes.AddLine beginx:=Range("C3").Left,
beginy:=Range("C3").Top, _
endx:=Range("G3").Left, endy:=Range("G3").Top



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
...Either vertical or horizontal.

Just an added tip:
Hold the Shift key down while you drag your new line to snap it into a more
Vertical or Horizontal position.

HTH
Dana DeLouis
 
Back
Top