#1   Report Post  
NeedMorHP
 
Posts: n/a
Default Find Command Button

I want to insert a Find Command Button in a spreadsheet so a user can click
on the button to go directly to a specific line.

thanks..
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi

Try this example for column A

This will select the first cell in column A with the InputBox value.

Sub Find_First()
Dim FindString As String
Dim Rng As Range
FindString = InputBox("Enter a Search value")
If Trim(FindString) < "" Then
Set Rng = Range("A:A").Find(What:=FindString, _
After:=Range("A" & Rows.Count), _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
Else
MsgBox "Nothing found"
End If
End If
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"NeedMorHP" wrote in message ...
I want to insert a Find Command Button in a spreadsheet so a user can click
on the button to go directly to a specific line.

thanks..



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I find the cell address of the 2nd largest of a set? Mr. Snrub Excel Discussion (Misc queries) 4 May 30th 05 01:53 PM
Edit + Find Mindy Excel Discussion (Misc queries) 2 April 8th 05 10:49 PM
Using the Find tool in EXCEL TK Excel Worksheet Functions 2 February 11th 05 08:51 PM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 11th 05 12:45 AM
VB Find and Replace Bony_Pony Excel Worksheet Functions 10 December 6th 04 06:45 PM


All times are GMT +1. The time now is 01:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"