-
This might work for you.
[VBA]Sub test()
Dim userInput As String
Dim rowFound As Variant
Dim dataColumn As Range
Set dataColumn = ThisWorkbook.Sheets("sheet1").Range("A:A"): Rem adjust
Do
userInput = Application.InputBox(userInput & "Which document do you want?", Type:=2)
If userInput = "False" Then Exit Sub: Rem cancel pressed
rowFound = Application.Match(userInput, dataColumn, 0)
If IsError(rowFound) Then userInput = "That document not found. Try again." & vbCr
Loop Until Right(userInput, 1) <> vbCr
dataColumn.Parent.Activate
dataColumn.Cells(rowFound, 1).Select
End Sub[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules