| 
    
     |  | ▼Jaka さん: こんにちわ
 >参考になると思います。
 >HTTp://www.vbalab.net/vbaqa/c-board.cgi?cmd=one;no=20909;id=excel
 Jakaさん紹介の↑スレを参考に
 Private Sub CommandButton1_Click()
 Dim mmc As Long, mmr As Long
 
 If ListBox1.ListIndex <= 0 Then Exit Sub
 
 mmc = Range(ListBox1.RowSource).Column
 mmr = Range(ListBox1.RowSource).Row
 TextBox1.Value = Cells(ListBox1.ListIndex + 2, mmc)
 TextBox2.Value = Cells(ListBox1.ListIndex + 2, mmc + 1)
 If ListBox1.ColumnCount > 2 Then
 TextBox3.Value = Cells(ListBox1.ListIndex + 2, mmc + 2)
 End If
 Cells(ListBox1.ListIndex + 2, mmc).Select
 MsgBox "このデータは、" & vbLf & _
 "リストボックス" & ListBox1.ListIndex + 1 & "行目から" & vbLf & _
 "対象セル" & Cells(ListBox1.ListIndex + 2, mmc).Address
 End Sub
 ユーザーフォームにTextBox1.2.3とCommandButton1を貼付、
 テストしてみたのですが何もかわらないのですが
 どのようなコードですか?よろしくお願いします。
 
 
 >いまいち良く解ってないけど....。
 >
 >>Private Sub CommandButton1_Click()
 >> Dim mmc As Long, mmr As Long
 >
 >  If ListBox1.ListIndex <= 0 Then Exit Sub ← これ?
 >
 >>  mmc = Range(ListBox1.RowSource).Column←★ココでエラー
 
 |  |