![]() |
Adding Range for Search
Hi,
I have created a search button in an excel spreadsheet. When I click on the button normal "Find" window opens up. However, it does not search the entire sheet. I have to manually highlight the column to search. But if I open the Find from Menu it searches the sheet without highlighting anything. Any suggestions. Thanks, Riz |
Adding Range for Search
Hi Riz
This might help. I enter the word I want to find in cell B2 & then click my search button. Sub Find() Range("B2").Select Cells.Find(What:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, _ SearchDirection:=xlNext, MatchCase:= False).Activate Do Cells.FindNext(After:=ActiveCell).Activate ANSWER = MsgBox(" LOOK AGAIN ", vbQuestion + _ vbYesNo, "GOT IT?") Loop While ANSWER = vbYes End Sub Mike Q -----Original Message----- Hi, I have created a search button in an excel spreadsheet. When I click on the button normal "Find" window opens up. However, it does not search the entire sheet. I have to manually highlight the column to search. But if I open the Find from Menu it searches the sheet without highlighting anything. Any suggestions. Thanks, Riz . |
All times are GMT +1. The time now is 06:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com