Public soki As Integer '初期設定 Public cm As Integer '選択列 Public st1 As String '選択スタ−ト Public en1 As String '選択END Public dbc As Integer 'ダブルクリック Public f1 As String 'フォルダ−名 Sub ki404() Application.ScreenUpdating = False Sheets("Sheet1").Select Cells(1 + 1, 1).Select soki = 1 ファイル soki = 0 リスト表示 Sheets("Title").Select With UserForm1 .Caption = "フォルダ−「" & Cells(1, 1) & "」" End With UserForm1.Show End Sub Sub リスト表示() With UserForm1 .Caption = "フォルダ−「" & f1 & "」" .lst1.RowSource = "Sheet1" & "!" & st1 & ":" & en1 End With End Sub Sub ファイル() Sheets("Sheet1").Select chk = 0 If soki = 0 Then For i = 2 To 7 For j = 1 To 10 If i <> cm Then If f1 = Cells(j, i) Then Cells(j + 1, i).Select chk = 1 Exit For End If End If Next If chk = 1 Then Exit For End If Next End If cm = ActiveCell.Column st1 = ActiveCell.Address Selection.End(xlDown).Select rc = Selection.Row en1 = ActiveCell.Address End Sub