[英]Background Excel and VBA
I am new to VBA, I have a excel file with completely white background, How can I change in to normal Excel format with default gridlines (not the borders) 我是VBA的新手,我有一个完全白色背景的excel文件,如何使用默认网格线(而不是边框)更改为普通Excel格式
Thanks 谢谢
I assume you mean to change the edges of the cell, You can do this as follows with the LineStyle property. 我假设您是要更改单元格的边缘,您可以使用LineStyle属性按如下方式进行操作。
Example: 例:
Range("A26:A27").Borders.LineStyle = xlContinuous 'modified edge style
Range("A26:A27").Borders.LineStyle = xlNone 'delete edge
Range("A26").Interior.ColorIndex = 19 'change cell color
Range("A26").Font.Bold = True 'put text in bold
Range("A26").Value = "Example text"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.