|
こんばんは。
こんな感じになりました。
Private Sub CommandButton1_Click()
Dim I As Long
Dim A As Long
Dim StrT() As String
With Me.ListBox1
For I = 0 To .ListCount - 1
If .Selected(I) Then
ReDim Preserve StrT(A)
StrT(A) = .List(I)
A = A + 1
End If
Next I
End With
If A > 0 Then
Sheets("Sheet1").Range("A5").Value = Join(StrT, "、")
End If
End Sub
Private Sub UserForm_Initialize()
With Me.ListBox1
.RowSource = Sheets("Sheet1").Range("A1:A3").Address(external:=True)
.MultiSelect = fmMultiSelectMulti
End With
End Sub
違ったらすいません。
|
|