advanced help
per page, with , order by , clip by
Results of 1 - 1 of about 8934 for リスト (0.006 sec.)
[[20200911184145]]
#score: 2746
@digest: 02a7febfce95aebfea29b8e87b1d0681
@id: 85144
@mdate: 2020-09-11T14:31:35Z
@size: 1691
@type: text/plain
#keywords: サオ (18595), 択li (6590), マサ (5844), listcount (5104), selected (3121), トen (2261), ト( (2027), 数選 (1660), トas (1594), 択さ (1577), ト& (1557), 数デ (1533), が選 (1473), す教 (1464), リス (1350), らa5 (1316), list (1263), らa3 (1139), listbox1 (1125), ト() (1056), ト= (1029), 太様 (977), スト (878), 選択 (859), オ) (837), commandbutton1 (790), 代入 (753), 半平 (697), 平太 (680), らa1 (590), に代 (587), 金) (482)
『複数選択された行の値を取得してセルに代入する』(マサオ)
複数選択された行の値を取得してセルに代入するコード Private Sub CommandButton1_Click() Dim リスト As String Dim i As Integer With ListBox1 For i = 0 To .ListCount - 1 If .Selected(i) = True Then リスト = リスト & .List(i) & vbCrLf End If Next i End With Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Value = リスト 上記では改行で複数データがA2しかはいらない 上記のコードを書き換えてList(i)の1が選択されたらA1 3が選択されたらA3に5が選択されたらA5に入力したいのです教えたください。 End Sub < 使用 Excel:Excel2019、使用 OS:Windows10 > ---- > List(i)の1が選択されたらA1 3が選択されたらA3に すると、こうですか。 Private Sub CommandButton1_Click() Dim リスト() As String Dim i As Integer With ListBox1 ReDim リスト(1 To .ListCount, 1 To 1) For i = 0 To .ListCount - 1 If .Selected(i) = True Then リスト(i + 1, 1) = .List(i) End If Next i Range("A1").Resize(.ListCount) = リスト End With End Sub (半平太) 2020/09/11(金) 19:46 ---- ありがとうございました。すいませんが半平太様もう一つ教えて頂けないでしょうか?リストボックスで選択List(i)の1が選択されたらA1 に〇を 3が選択されたらA3に 〇 5が選択されたらA5に 〇入力したいのです教えたください。選択されたら〇を入力するにはどう書けばいいのでしょうか? (マサオ) 2020/09/11(金) 20:27 ---- >リスト(i + 1, 1) = .List(i) ↓ リスト(i + 1, 1) = "○" (半平太) 2020/09/11(金) 21:01 ---- 半平太様さんありがとうございました。 (マサオ) 2020/09/11(金) 23:31 ...
https://www.excel.studio-kazu.jp/wiki/kazuwiki/202009/20200911184145.txt - [detail] - similar
PREV NEXT
Powered by Hyper Estraier 1.4.13, with 97065 documents and 608342 words.

訪問者:カウンタValid HTML 4.01 Transitional