怎样用VB使EXCEL中某一sheet所有单元格的字体居中、大小为10、颜色为黑色?
如题:怎样用VB使EXCEL中某一sheet所有单元格的字体居中、大小为10、颜色为黑色?
Cells.Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection.Font
.Name = "宋体"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Font.ColorIndex = 1
OK~~ 谢谢~~ 在Excel里录个宏,直接复制粘贴过去就能用.. +1。宏录制太有用了. 请问怎么录制宏呢?小弟刚学VB 不太懂,特请指教~~ 新问题新帖子
Sheet1.Cells.Font.Size = 20
Sheet1.Cells.HorizontalAlignment = 3
Sheet1.Cells.Font.ColorIndex = 0
打开Word或Excel从菜单里可以找到
这个...录制宏跟学没学VB关系不大
补充:VB , 基础类