Hi,
So welcome in the IT domain!
You have right that this is good to be stored like a procedure or function!
In VB in the procedures you can store an algoritme but this algoritme don't give result!
The procedures are declared like:
Sub find_replace(Search_string, Replace_String, Match_case, FInd_whole_words_only)
Algoritme
End sub
And there is no result when they are executed!
They are called frome your code like:
find_replace(Search_string, Replace_String, Match_case, FInd_whole_words_only)
In the construction of functions there is result that is returned!
Function find_replace(Search_string, Replace_String, Match_case, FInd_whole_words_only) AS Longint
Algoritme
find_replace=number_of_replacements
Function sub
The function can be called like:
Msgbox "Word has made ;" & str(find_replace(Search_string, Replace_String, Match_case, FInd_whole_words_only)) & " replacements"
Usually the functions and procedures are wrotten in modules. It depend of the destination of the functions and procedures...
When the respective module is loaded in your program you can use the specified function or procedure stored on it...
To facilitate the programers that write on different languages, many of the languages have the option to create a module on the respective language as dll
dinamic linked library!
One time your module in dll, you can use it in other languages to program!
In Windows there is a lot of dll... You need to know what functions and procedures you have and their parameters in the respective dll for use them!
For find and replace as function in windows you need to search in what dll is stored and what are the parameters...
Then in the respective4 language you need to check how to declare a dll function or procedure and it's all!
Best regards!
:)