回答編集履歴
1
追記
test
CHANGED
@@ -11,3 +11,27 @@
|
|
11
11
|
MsgBox ListBox1.Text
|
12
12
|
|
13
13
|
```
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
追記
|
18
|
+
|
19
|
+
範囲選択したセルの値を結合してメッセージボックスに表示する。
|
20
|
+
|
21
|
+
```VBA
|
22
|
+
|
23
|
+
Dim r1 As Variant
|
24
|
+
|
25
|
+
Dim r2 As Variant
|
26
|
+
|
27
|
+
With Worksheets("入力画面")
|
28
|
+
|
29
|
+
r1 = .Range(.Cells(ListBox1.List(ListBox1.ListIndex, 0) + 1, 1), .Cells(ListBox1.List(ListBox1.ListIndex, 0) + 1, 11))
|
30
|
+
|
31
|
+
r2 = WorksheetFunction.Transpose(WorksheetFunction.Transpose(r1))
|
32
|
+
|
33
|
+
MsgBox Join(r2, "")
|
34
|
+
|
35
|
+
End With
|
36
|
+
|
37
|
+
```
|