質問編集履歴
2
誤記修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -24,11 +24,11 @@
|
|
24
24
|
Dim i As Integer
|
25
25
|
|
26
26
|
For i = 0 To 2
|
27
|
-
Set sh = wb.Sheets(
|
27
|
+
Set sh = wb.Sheets(i) 'i番目のシート
|
28
28
|
Aline(i) = "その" & i
|
29
29
|
Bline(i) = "その" & i
|
30
30
|
lastRow = Cells(30, "C").End(xlUp).Row 'ラストの行を取得
|
31
|
-
CoppyData(
|
31
|
+
CoppyData(i) = sh.Range("A1:G" & lastRow).Value 'シートの値を取得
|
32
32
|
Next i
|
33
33
|
|
34
34
|
'一回Forから抜け出したい
|
1
誤記修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -36,7 +36,7 @@
|
|
36
36
|
For i = 0 To 2
|
37
37
|
lastRow = Cells(Rows.Count, "A").End(xlUp).Row 'ラストの行を取得
|
38
38
|
Range("A" & lastRow + 1).Resize(UBound(CoppyData, 1)) = Aline(i) 'そのiをA列に貼り付ける
|
39
|
-
Range("B" & lastRow + 1).Resize(UBound(CoppyData, 1)) = Bline(i) 'そのiを
|
39
|
+
Range("B" & lastRow + 1).Resize(UBound(CoppyData, 1)) = Bline(i) 'そのiをB列貼り付ける
|
40
40
|
Range("C" & lastRow + 1).Resize(UBound(CoppyData, 1), UBound(CoppyData, 2)) = CoppyData(i) 'ここでエラーが発生
|
41
41
|
Next i
|
42
42
|
|