Very Urgent - Excel Macro Question

Could somebody post vb script for an excel macro that does the following

1)Accept the Input i) a string and ii) a test file with path (say C:\ip.txt)
Output should be written to say C:\op.txt mentioning
how manu instances of the case sensitive string occurs in each line of the file

Eg: C:\ip.txt has the following lines and the search is for the string 'any'

any many
many anyone ANY
nany

Output file C:\op.txt should display

Line # Number of instances

1 2
2 2
3 1

2) Same requirement as above but string is non-case sensitive

3) Same requirement above but seach for a character and not a string

4) Same requirement as above but the Input is a word .doc file
instead of .txt file

5) What changes should I make to the code to run the macro from Word instead of Excel

Thanks
itnovice
[942 byte] By [itnovice] at [2007-11-19 19:57:45]
# 1 Re: Very Urgent - Excel Macro Question
This looks like a homework to me :ehh:
vma at 2007-11-9 20:10:43 >
# 2 Re: Very Urgent - Excel Macro Question
1)Post the code you have so far
2)Point out where you are having problems
3)If someone has an aswer to your problem they will suggest how to fix it.

Rich
Rich2189 at 2007-11-9 20:11:47 >