View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Steve Smallman Steve Smallman is offline
external usenet poster
 
Posts: 47
Default Command button to search column

Al,


Sub Find_in_column_B()
Dim FindString As String

FindString = InputBox("Enter string to find, use '?' and '*' as
appropriate", "Find what in column B")
Columns("B:B").Select
Selection.Find(What:=FindString, After:=ActiveCell, LookIn:=xlFormulas,
_
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
End Sub

Then Assign it to a button on a user toolbar (open Excel help in the Answer
Wizard and enter "assign a macro to a button")

Steve
"Al" wrote in message
...
I have not coded in Excel before but have done some in
Access. I recently received a request to do the following:

In an Excel 2000 spreadsheet, I would like to be able to
press a command button, bring up a textbox that asks the
user for part of a search string for column "B" (can it
use wildcards?), and finally, go to the row where the
searched value exists.

TIA,
Al