回答編集履歴
1
指摘を受け、正しいロジックへ
test
CHANGED
@@ -32,34 +32,48 @@
|
|
32
32
|
|
33
33
|
|
34
34
|
|
35
|
-
|
35
|
+
'指摘事項修正
|
36
36
|
|
37
|
-
|
37
|
+
i = 0
|
38
38
|
|
39
|
-
|
39
|
+
With DataGridView1
|
40
40
|
|
41
|
+
For j = 0 To 11
|
42
|
+
|
41
|
-
|
43
|
+
.Columns.Add(0, addstr(0, j)) '指摘事項修正:列は一つずつ作られる
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
If j = 0 Then
|
48
|
+
|
49
|
+
.Rows.Add() '指摘事項修正:行は1行ずつ作られる
|
50
|
+
|
51
|
+
.Rows.Add()
|
52
|
+
|
53
|
+
End If
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
For i = 1 To 2
|
58
|
+
|
59
|
+
.Rows(i - 1).Cells(j).Value = addstr(i, j) '作ってから値を入れる
|
42
60
|
|
43
61
|
Next
|
44
62
|
|
45
|
-
|
63
|
+
Next
|
46
64
|
|
47
|
-
For j = 0 To 10
|
48
|
-
|
49
|
-
.Rows(i).Cells(j).Value = addstr(i, j)
|
50
|
-
|
51
|
-
Next
|
52
|
-
|
53
|
-
|
65
|
+
End With
|
54
|
-
|
55
|
-
Next
|
56
66
|
|
57
67
|
|
58
68
|
|
59
69
|
DataGridView1.AllowUserToAddRows = False
|
60
70
|
|
61
|
-
DataGridView1.RowCount = 3
|
62
71
|
|
72
|
+
|
73
|
+
'作る数が正しければ、特に列・行の制御はいらない
|
74
|
+
|
75
|
+
'DataGridView1.RowCount = 3
|
76
|
+
|
63
|
-
DataGridView1.ColumnCount = 11
|
77
|
+
'DataGridView1.ColumnCount = 11
|
64
78
|
|
65
79
|
```
|