1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next ' クリックセルの値チェック If Target.Value <> "[削除]" Then Exit Sub ' クリックセルの範囲チェック If Target.Row < 2 Then Exit Sub If Target.Column <> 8 Then Exit Sub ' クリック行の値を取得 id = ActiveSheet.Cells(Target.Row, 1).Value End Sub |