質問編集履歴
1
ご指摘を受けてインデント加えさせて頂きました。
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -22,8 +22,9 @@
|
|
|
22
22
|
宜しくお願い致します。
|
|
23
23
|
下記、全体のコードです。
|
|
24
24
|
|
|
25
|
+
'''lang-excelvba
|
|
25
26
|
|
|
26
|
-
Sub
|
|
27
|
+
Sub test_マトリクス順次入力()
|
|
27
28
|
|
|
28
29
|
ReDim Files_1(0)
|
|
29
30
|
ReDim Files_2(0)
|
|
@@ -37,21 +38,20 @@
|
|
|
37
38
|
Dim i As Long
|
|
38
39
|
i = 3
|
|
39
40
|
Do Until Cells(i, 3) = ""
|
|
40
|
-
|
|
41
|
+
n = UBound(Files_1)
|
|
41
|
-
|
|
42
|
+
ReDim Preserve Files_1(n + 1)
|
|
42
|
-
|
|
43
|
+
Files_1(n + 1) = Cells(i, 3)
|
|
43
|
-
|
|
44
|
+
i = i + 1
|
|
44
45
|
Loop
|
|
45
46
|
|
|
46
47
|
Dim j As Long
|
|
47
|
-
|
|
48
48
|
j = 3
|
|
49
49
|
|
|
50
50
|
Do Until Cells(j, 4) = ""
|
|
51
|
-
|
|
51
|
+
m = UBound(Files_2)
|
|
52
|
-
|
|
52
|
+
ReDim Preserve Files_2(m + 1)
|
|
53
|
-
|
|
53
|
+
Files_2(m + 1) = Cells(j, 4)
|
|
54
|
-
|
|
54
|
+
j = j + 1
|
|
55
55
|
Loop
|
|
56
56
|
|
|
57
57
|
For k = 1 To UBound(Files_1)
|
|
@@ -62,22 +62,18 @@
|
|
|
62
62
|
this_sheet.Cells(2, 6 + l) = Files_2(l)
|
|
63
63
|
Next
|
|
64
64
|
|
|
65
|
-
|
|
66
65
|
For k = 1 To UBound(Files_1)
|
|
67
|
-
|
|
68
|
-
For l = 1 To UBound(Files_2)
|
|
66
|
+
For l = 1 To UBound(Files_2)
|
|
69
|
-
|
|
70
|
-
this_sheet.Cells(2 + k, 6 + l).Activate
|
|
67
|
+
this_sheet.Cells(2 + k, 6 + l).Activate
|
|
71
|
-
|
|
72
|
-
dblTimer = Timer
|
|
68
|
+
dblTimer = Timer
|
|
73
|
-
Do Until Int(Timer - dblTimer) = 11
|
|
69
|
+
Do Until Int(Timer - dblTimer) = 11
|
|
74
|
-
|
|
70
|
+
this_sheet.Cells(2, 6) = Int((Timer - dblTimer))
|
|
75
|
-
|
|
71
|
+
DoEvents
|
|
76
|
-
Loop
|
|
72
|
+
Loop
|
|
77
|
-
|
|
73
|
+
Next
|
|
78
74
|
Next
|
|
79
75
|
|
|
80
|
-
Next
|
|
81
76
|
|
|
77
|
+
End Sub
|
|
82
78
|
|
|
83
|
-
|
|
79
|
+
'''
|