|
こんにちは
こんな感じですよ。
Dim i As Long, Co As Long, Co1 As Long, Co2 As Long, Co3 As Long
Co = 0: Co1 = 0: Co2 = 0: Co3 = 0
With Me
For i = 5 To 175
If IsNumeric(.Controls("TextBox" & i).Value) Then
Select Case i
Case 5 To 46
Co = Co + 1
Case 48 To 89
Co1 = Co1 + 1
Case 91 To 132
Co2 = Co2 + 1
Case 134 To 175
Co3 = Co3 + 1
End Select
End If
Next i
.TextBox179.Value = Co
.TextBox184.Value = Co1
.TextBox189.Value = Co2
.TextBox193.Value = Co3
.TextBox178.Value = Val(.TextBox47.Value) * 50
.TextBox183.Value = Val(.TextBox90.Value) * 50
.TextBox188.Value = Val(.TextBox133.Value) * 50
.TextBox192.Value = Val(.TextBox176.Value) * 50
.TextBox180.Value = Co * 2000
.TextBox185.Value = Co1 * 2000
.TextBox190.Value = Co2 * 2000
.TextBox194.Value = Co3 * 2000
End With
|
|