|
横から失礼します。
これでどうでしょう?
Private Sub CommandButton1_Click()
Dim A(1 To 15) As Long
Dim gyou As Long
Dim AA As Long
Dim MyWidth As Single
Dim i As Long
Dim j As Long
Dim k As Long
Dim l As Long
Dim m As Long
Dim n As Long
Dim o As Long
Dim p As Long
A(1) = 100: A(2) = 200: A(3) = 300: A(4) = 400: A(5) = 500
A(6) = 600: A(7) = 700: A(8) = 800: A(9) = 900: A(10) = 1000
A(11) = 1100: A(12) = 1200: A(13) = 1300: A(14) = 1400: A(15) = 1500
Label1.Caption = "実行中....."
With Label3
MyWidth = .Width
.BackColor = &HFF0000
For i = 1 To 8
For j = i + 1 To 9
For k = j + 1 To 10
For l = k + 1 To 11
For m = l + 1 To 12
For n = m + 1 To 13
For o = n + 1 To 14
For p = o + 1 To 15
gyou = gyou + 1
If gyou < 65536 Then
Cells(gyou, 1) = A(i)
Cells(gyou, 2) = A(j)
Cells(gyou, 3) = A(k)
Cells(gyou, 4) = A(l)
Cells(gyou, 5) = A(m)
Cells(gyou, 6) = A(n)
Cells(gyou, 7) = A(o)
Cells(gyou, 8) = A(p)
Label3.Width = MyWidth * (gyou / 6435)
DoEvents
End If
Next
Next
Next
Next
Next
Next
Next
Next
End With
Label1.Caption = "処理が終了しました"
End Sub
|
|