Sub 保存新增()
Dim intS As Integer, Myr%
Dim rngC As Range
Dim strToFind As String, FirstAddress As String
Dim wSht As Worksheet
'Application.ScreenUpdating = False
intS = 1
Set wSht = Worksheets("记录")
' Myr = wSht.[c65536].End(xlUp).Row + 1
For i = 5 To 9
Myr = wSht.[c65536].End(xlUp).Row + 1
If Cells(i, 1) <> "" Then
With wSht
.Cells(Myr, 3) = [c3].Value
'.Cells(Myr, 4) = [f3].Value
.Cells(Myr, 5) = Cells(i, 1)
.Cells(Myr, 6) = Cells(i, 2)
.Cells(Myr, 7) = Cells(i, 3)
.Cells(Myr, 8) = Cells(i, 4)
.Cells(Myr, 9) = Cells(i, 5)
.Cells(Myr, 10) = Cells(i, 6)
.Cells(Myr, 11) = Cells(i, 7)
.Cells(Myr, 12) = Cells(i, 8)
End With
End If
Next i
wSht.Activate
'Application.ScreenUpdating = True
Sheets("录入").Select
With Sheets("录入")
.Range("a5:b9,d5:h9").ClearContents
.Cells(3, 6) = .Cells(3, 6) + 1
.Cells(3, 3) = Format(Now, "yyyy年m月d日")
End With
End Sub
|