Border around each cell in a range

前端 未结 7 1904
你的背包
你的背包 2020-12-14 00:38

I am trying to create a simple function that will add borders around every cell in a certain range. Using the wonderful recording this generates a ton of code which is quite

7条回答
  •  余生分开走
    2020-12-14 01:00

    For adding borders try this, for example:

    Range("C11").Borders(xlEdgeRight).LineStyle = xlContinuous
    Range("A15:D15").Borders(xlEdgeBottom).LineStyle = xlContinuous
    

    Hope that syntax is correct because I've done this in C#.

提交回复
热议问题