Private Sub Worksheet_Activate()
Call 单元格字体设置("A1:C100", "宋体", 12)
Rows("11:11").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.EntireRow.Hidden = True
Columns("E:E").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.EntireColumn.Hidden = True
End Sub
Sub 单元格字体设置(strRange As String, strFontName As String, strFontSize As Integer)
Dim myRange As Range
Dim myFont As Font
Set myRange = Range(strRange) '指定任意的单元格区域
Set myFont = myRange.Font
With myFont
.Name = strFontName
.Size = strFontSize
.Bold = False
.Italic = False
.ColorIndex = 1
End With
Set myFont = Nothing
Set myRange = Nothing
End Sub
作者:LiW

1774

被折叠的 条评论
为什么被折叠?



