回答編集履歴
2
修正
test
CHANGED
@@ -9,3 +9,15 @@
|
|
9
9
|
ws2.Range(ws2.Cells(3, 2), ws2.Cells(14, 4)) = ws1.Range(ws1.Cells(T, J), ws1.Cells(G, C))
|
10
10
|
|
11
11
|
```
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
あと、変数は長整数型(Long)で宣言しましょう。
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
```vba
|
20
|
+
|
21
|
+
Dim D As Long, n As Long, E As Long, T As Long, J As Long, G As Long, H As Long, K As Long, A As Long, B As Long, C As Long
|
22
|
+
|
23
|
+
```
|
1
修正
test
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
あるあるの質問ですが、内側のRangeにもシートを指定するようにしましょう。
|
2
|
+
|
3
|
+
あと、Range(3, 2) というような指定はできないです。行番号、列番号で指定するなら Cells(3, 2) という指定になります。
|
2
4
|
|
3
5
|
|
4
6
|
|
5
7
|
```vba
|
6
8
|
|
7
|
-
ws2.Range(ws2.
|
9
|
+
ws2.Range(ws2.Cells(3, 2), ws2.Cells(14, 4)) = ws1.Range(ws1.Cells(T, J), ws1.Cells(G, C))
|
8
10
|
|
9
11
|
```
|