|
Private Sub UserForm_Initialize() '01
Dim iRow As Integer '02
Dim arr As Variant '03
With Me.Spreadsheet1 '04
.DisplayToolbar = False '05
.DisplayHorizontalScrollBar = False '06
.DisplayVerticalScrollBar = False '07
.DisplayWorkbookTabs = False '08
iRow = Sheet1.Range("B65536").End(xlUp).Row '09
arr = Sheet1.Range("B2:H" & iRow) '10 运行到这里时出现错误提示,表SHEET1是存在的。另外问一下,附件怎么上传?
With .Range("B2:H" & iRow) '11
.Value = arr '12
.Borders.LineStyle = xlContinuous '13
.Borders.Weight = xlMedium '14
.Borders.ColorIndex = 10 '15
End With '16
With .Range("B2:H2") '17
.HorizontalAlignment = -4108 '18
.VerticalAlignment = -4108 '19
.Interior.ColorIndex = 44 '20
End With '21
.Range("B3:B" & iRow).HorizontalAlignment = -4108 '22
.Range("C3:H" & iRow).NumberFormat = "0.00" '23
.Rows(2).RowHeight = 23.25 '24
.Columns("A").ColumnWidth = 2.75 '25
.Columns("B:H").ColumnWidth = 8 '26
End With '
End Sub '
|
|