|
Sub Test_検索()
Dim Ary As Variant
Dim St As String
Dim FR As Range
Ary = Array("あ", "い", "う", "え", "お", "か", "き", "く", _
"け", "こ", "さ", "し", "す", "せ", "そ", "た", "ち", "つ", _
"て", "と", "な", "に", "ぬ", "ね", "の", "は", "ひ", "ふ", _
"へ", "ほ", "ま", "み", "む", "め", "も", "や", "ゆ", "よ", _
"ら", "り", "る", "れ", "ろ", "わ")
Do
St = InputBox("{ あ〜わ } のうちの一文字を入力して下さい")
If St = "" Then Exit Sub
Loop While IsError(Application.Match(St, Ary, 0))
Set FR = Worksheets("AAA").Range("A:A") _
.Find(St, , xlValues, xlWhole, , xlPrevious)
If FR Is Nothing Then
MsgBox "「 " & St & " 」は見つかりません", 48
Else
Application.GoTo FR, True
Set FR = Nothing
End If
End Sub
で、どうでしょーか ?
|
|