开发者

How do I add put a border around every 2 lines in excel worksheet

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

After outputing data to a worksheet, i wan开发者_StackOverflow中文版t to format it.

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

regards

Kojo


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜