
セルに罫線を引くには、BordersコレクションのLineStyleプロパティで設定します。
例
たとえば、せるB3~D6までの範囲でセルに罫線を引くには次のように記述します。Sub DrawLine() Range("B3:D6").Borders.LineStyle = xlContinuous End Sub
実行結果

comments powered by Disqus
スポンサーリンク
2017年6月21日 (水) 22:36 in Excel , VBA
Sub DrawLine() Range("B3:D6").Borders.LineStyle = xlContinuous End Sub
スポンサーリンク