473,323 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

how to create a search function in vb6

Im new here, but Im looking to create a program which can search a user-specified directory for any occurance of a specified phrase or word. Im a chef who has umpting number of recipes and I store them as tiny word docs (usually on a couple of kb's in size) in a standard windows folder. I want to be able to search for say the word pastry and list all the recipes with that word occuring inside that file. The user should then be able to open/edit/save the desired file from within this program. Is this possible and if so, how would I go about creating this? Any help will be appreciated.
Jun 10 '07 #1
8 5270
Killer42
8,435 Expert 8TB
You don't need a program for that. Windows Explorer can do the search for you and list the documents. From the list you can open, print, delete, copy or whatever you'd normally do with them from Explorer.
Jun 11 '07 #2
debasisdas
8,127 Expert 4TB
No need to re-invent the wheel.

Its already there.

refer to the previous post.
Jun 11 '07 #3
z0mg
2
Guys, can you plz read what he said before posting? >>>

"I want to be able to search for say the word pastry and list all the recipes with that word occuring inside that file."

<sigh>
Jun 20 '07 #4
I think they did, as they say, the function is already there!

You have "All or part of the file name:"

And

"A word or phase in the file:"
Jun 20 '07 #5
Killer42
8,435 Expert 8TB
...You have "All or part of the file name:"
And
"A word or phase in the file:"
Correct. That's what I was referring to. Mind you, it does have some shortcomings - for one thing, it tends to ignore some file types.

However, I think we'll have to wait for sheppyonline to let us know whether this is close enough to what was sought.
Jun 21 '07 #6
z0mg
2
i c now, sry for being so harsh :)
Jun 27 '07 #7
packyu
2
you can use the "Windows Common Dialog 6" to save or open. I hope this useful
Jun 28 '07 #8
Killer42
8,435 Expert 8TB
you can use the "Windows Common Dialog 6" to save or open. I hope this useful
Yes, if you need to choose the file or files to process, the common dialogue control is very useful. Likewise, to read the files and look through them for a search string, you can either use the built-in statements such as Open, or the FileSystemObject object (better functionality, slightly more complex to use).

But so far, all we know is that the original poster wants to be able to find some files. You don't need to write your own program for that, as it's built into Windows. If there are further requirements which are not met by Windows, well, we're here to help.
Jun 28 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Sally B. | last post by:
Hello, I searched, but couldn't find answers--probably because I'm not sure what this is called... Anyway, I have about 50 web pages and I want to have some JavaScript that will read in a list of...
5
by: Marek | last post by:
I'm trying to create a web page. I will have one column with records (table filled from dataset). If mouse will be on one from this records, i want to show a hint what is it (like in Windows -...
0
by: Net | last post by:
Hi, I need to create a VB.Net search function against an Access database. When the user enters a character the function should search last name and the tree listview needs to be updated to show...
11
by: admin | last post by:
Hi all, First time poster here... I'm a webmaster and I'd like to add a simple script to my website which will allow users to fill in a brief multiple choice questionaire, and then provide a...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
4
by: BenCoo | last post by:
Hello, In a Binary Search Tree I get the error : Object must be of type String if I run the form only with the "Dim bstLidnummer As New BinarySearchTree" it works fine. Thanks for any...
3
by: bluez | last post by:
I want to design a webpage where user can search the data from the database and list out the related records. Each of the record got a delete button which allow user to delete the record. ...
4
by: sirjohnofthewest | last post by:
If I possessed the power to sway the mind of every user in the world to delete all forms of Internet Explorer I would die a happy man. Hi guys, I frequently visit this site to get answers to my...
9
by: Peri | last post by:
Dear All, I have written a common array class which has insert, search and other functions. For Example (Code in VB.NET): ' Client Class Public Class Client Public ClientCode As String ...
0
by: TrevRex | last post by:
Hello, I work for a non-profit in San Diego as a GIS Specialist. I have had to teach myself about some scripting to create some dynamic maps, but I am still very limited in my skills, so I have...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.