Need diagonal lines behind printed cells.

J

Jimmy D

Have an extremely simplistic program that fills cells with information and
then enables user to print various pages dependant on certain criteria.
My problem is that a user in his wisdom has redesigned the printed form to
include diagonal lines around the outside of a box in which this info is
printed.
I now need to include these lines in the printouts I produce.
Most of the printing is accomplished with simple VB and cells fill with
cell=workbook(cell).
 
K

Kevin B

You could select the print range and have the vb code use the following to
add diagonal lines:

With Selection.Borders(xlDiagonalDown)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With

With Selection.Borders(xlDiagonalUp)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
 
J

Jimmy D

This will only put diagonal lines through the cells?
I'm sorry I don't think I explained myself enough. The only way I was able
to reproduce the diagonal lines as per the form was to utilise the draw
feature. There are about 7 lines by 1.5inch wide, on an A4 sheet. These pass
behind a text box that contains the area I am trying to autofill. This does
not allow me to utilise the diagonal lines within excel cells to perform the
task as I would need to completely fill some cells while only half filling
others.
 

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