Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

format question

  Asked By: Juana    Date: Aug 31    Category: MS Office    Views: 603
  

Is there a way to format or simulate a border line
horizontally through the center of a cell? I would
like to make it look like it attaches to the vertical
border on the cell to it's left.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Alan Palmer     Answered On: Aug 31

For the selected cell(s)/range:

ActiveSheet.Shapes.AddLine Selection.Left, Selection.Top +
(Selection.Height / 2), Selection.Left + Selection.Width,
Selection.Top + (Selection.Height / 2)

If you've set the properties of the Autoshape to 'move and size with
cells' then the left  and right of the line should stick to the edges
of the cell  when you change column width but the distance from the top
of the cell will remain the same if you were to change the row height.

 
Didn't find what you were looking for? Find more on format question Or get search suggestion and latest updates.




Tagged: