| 
    
     |  | ▼Jaka さん: ありがとうございます。
 ユーザーフォームにListBox1*1、TextBox1.2.3、CommandButton1を配し
 下記のようなコードでテストしてみたのですが
 エラーがでます
 rengeメゾットは失敗しました。Globalオブジェクト
 どういう意味ですかヘルプにも何も表示されません
 
 Option Explicit
 
 Private Sub CommandButton1_Click()
 Dim mmc As Long, mmr As Long
 
 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
 
 >参考になると思います。
 >HTTp://www.vbalab.net/vbaqa/c-board.cgi?cmd=one;no=20909;id=excel
 
 |  |