'Draw ' a line

C

Chip Pearson

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
 
D

Dana DeLouis

...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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top