tags:

views:

127

answers:

1

hi,

can someone please give me some guidelines on this. I'm fairly new to VBA.

After outputing data to a worksheet, i want to format it.

How do I add put a border around every 2 lines in an excel worksheet using VBA?

regards

Kojo

+4  A: 

By using the conveniently named method.

Dim i As Long

For i = 1 To 10 Step 2
  Me.Range(Me.Cells(i, 1), Me.Cells(i + 1, 10)).BorderAround xlSolid, xlMedium
Next
GSerg
thanks for that. much appreciated.
Kojof