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:44]
# 1 Re: Very Urgent - Excel Macro Question
Welcome! :wave:
I notice you've asked this question in the VB6 Forum as well,
Do you want the answer in VB.NET or VB6
HanneSThEGreaT at 2007-11-10 3:14:09 >
# 2 Re: Very Urgent - Excel Macro Question
VB 6

All I want is the VB script to work in the Excel macro
itnovice at 2007-11-10 3:15:20 >