LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VB coding for showing "find" dialogue box?

StargateFan wrote in message . ..
On Tue, 8 Jun 2004 07:05:45 -0700, "Bridget"
wrote:


[snip]

Is there a way to get the coding with no word wrap so that it works,
Fred (or anyone)?


Can anyone suggest what to do about the word wrap? I've still not
successfully gotten this code to work as I suspect there may be
incorrect syntax due to word wrap.

Thank you!! :oD

"From: Fred_is_stuck < (Fred_is_stuck.17ilo8@excelforum-
nospam.com)
Subject: VB coding for showing "find" dialogue
box?


[snip]

hi there Stargatefan,

I use this coding in my spreadsheets..... it finds every
instance of
what im looking for on a sheet without fail.... if the
data exists that
is lol.

I can't take credit for this coding and I can't give
credit to the
original coder as I don't know whom that was.

Hope it is of use to you.

you'll just need to copy it to a module


sub findthis()
Dim MyValue, MyFindNext
[A1].Select
MyValue = InputBox("Type in what you are Searching
for.", "Search
for...")
On Error GoTo err_Trap
Cells.Find(What:=MyValue, After:=ActiveCell,
LookIn:=xlFormulas,
LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False).Activate
MyFindNext = vbYes
Do Until MyFindNext < vbYes
MyFindNext = MsgBox("Want to search for " & MyValue & "
Again?", _
vbYesNo, "Find Next")
If MyFindNext = vbNo Then
Exit Sub
End If
Cells.FindNext(After:=ActiveCell).Activate
Loop
On Error GoTo 0
Exit Sub
err_Trap:
If Err.Number = 91 Then
MsgBox "Awwww Sorry couldn't find " & MyValue & " anywhere
on
this sheet :o( ", , "Totally Unsuccessful search"
Else
MsgBox Err.Number & ": " & Err.Description
End If
End Sub


[snip]
 
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
getting rid of the "confirm delete" dialogue box when deleting a s Bernard Excel Discussion (Misc queries) 5 July 3rd 09 11:49 PM
cancel the "Getting Started" Dialogue Box when I open XL/Word jazzy1 Setting up and Configuration of Excel 1 May 2nd 08 12:53 AM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
"=ROW()-1" type of coding doesn't appear in a filter / is there coding that does? StargateFan[_3_] Excel Programming 10 October 6th 05 01:18 PM


All times are GMT +1. The time now is 06:52 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"