M
mark_the_yeti
For my next trick, I'd like to have the "find all" feature pop up as soon as
the workbook opens.
The workbook is to serve as a searchable database of material safety data
sheets, where all chemicals in the plant are listed and linked to the
appropriate MSDS.
For example, when a user opens the workbook, the "find all" box should
appear, they should be able to type in "oil" and get about 30 results because
the search was too broad... but that's the general idea.
I wrote code to find the first instance of a word (below), but it doesn't
completely solve my problem. Thanks so much for the help.
Private Sub Workbook_Open()
Item = InputBox("Tell me what you're looking for")
Cells.Find(What:=Item, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate
End Sub
the workbook opens.
The workbook is to serve as a searchable database of material safety data
sheets, where all chemicals in the plant are listed and linked to the
appropriate MSDS.
For example, when a user opens the workbook, the "find all" box should
appear, they should be able to type in "oil" and get about 30 results because
the search was too broad... but that's the general idea.
I wrote code to find the first instance of a word (below), but it doesn't
completely solve my problem. Thanks so much for the help.
Private Sub Workbook_Open()
Item = InputBox("Tell me what you're looking for")
Cells.Find(What:=Item, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate
End Sub